/*@preserve ***Version 2.41.0*** */ /*@license * Copyright 2002 - 2018 Qualtrics, LLC. * All rights reserved. * * Notice: All code, text, concepts, and other information herein (collectively, the * "Materials") are the sole property of Qualtrics, LLC, except to the extent * otherwise indicated. The Materials are proprietary to Qualtrics and are protected * under all applicable laws, including copyright, patent (as applicable), trade * secret, and contract law. Disclosure or reproduction of any Materials is strictly * prohibited without the express prior written consent of an authorized signatory * of Qualtrics. For disclosure requests, please contact notice@qualtrics.com. */ try { (window["WAFQualtricsWebpackJsonP-cloud-2.41.0"]=window["WAFQualtricsWebpackJsonP-cloud-2.41.0"]||[]).push([[11],{26:function(e,t,r){"use strict";r.r(t),function(e,n){r.d(t,"EventType",(function(){return Wc})),r.d(t,"IncrementalSource",(function(){return Vc})),r.d(t,"MouseInteractions",(function(){return Yc})),r.d(t,"Replayer",(function(){return Cu})),r.d(t,"ReplayerEvents",(function(){return Xc})),r.d(t,"addCustomEvent",(function(){return ku})),r.d(t,"canvasMutation",(function(){return gu})),r.d(t,"freezePage",(function(){return xu})),r.d(t,"mirror",(function(){return pc})),r.d(t,"record",(function(){return Yh})),r.d(t,"takeFullSnapshot",(function(){return Eu})),r.d(t,"utils",(function(){return jc}));var s,i=Object.defineProperty,o=Object.defineProperties,a=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,u=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d=(e,t)=>{for(var r in t||(t={}))c.call(t,r)&&u(e,r,t[r]);if(l)for(var r of l(t))h.call(t,r)&&u(e,r,t[r]);return e},p=(e,t)=>o(e,a(t)),f=(e,t,r)=>u(e,"symbol"!=typeof t?t+"":t,r),m=Object.defineProperty,g=Object.defineProperties,y=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,S=(e,t,r)=>t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_=(e,t)=>{for(var r in t||(t={}))b.call(t,r)&&S(e,r,t[r]);if(w)for(var r of w(t))v.call(t,r)&&S(e,r,t[r]);return e},C=(e,t)=>g(e,y(t)),k=(e,t)=>{var r={};for(var n in e)b.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&w)for(var n of w(e))t.indexOf(n)<0&&v.call(e,n)&&(r[n]=e[n]);return r},x=(e,t,r)=>S(e,"symbol"!=typeof t?t+"":t,r),E=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(E||{});const I={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},A={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},M={};function T(e){if(M[e])return M[e];const t=globalThis[e],r=t.prototype,n=e in I?I[e]:void 0,s=Boolean(n&&n.every(e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),i=e in A?A[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(s&&o&&!globalThis.Zone)return M[e]=t.prototype,t.prototype;try{let n=document.getElementById("rrweb-unmodified-iframe");n||(n=document.createElement("iframe"),n.id="rrweb-unmodified-iframe",n.style.display="none",document.body.appendChild(n));const s=n.contentWindow;if(!s)return t.prototype;const i=s[e].prototype;return i?M[e]=i:r}catch(e){return r}}const R={};function O(e,t,r){var n;const s=`${e}.${String(r)}`;if(R[s])return R[s].call(t);const i=T(e),o=null==(n=Object.getOwnPropertyDescriptor(i,r))?void 0:n.get;return o?(R[s]=o,o.call(t)):t[r]}const N={};function D(e,t,r){const n=`${e}.${String(r)}`;if(N[n])return N[n].bind(t);const s=T(e)[r];return"function"!=typeof s?t[r]:(N[n]=s,s.bind(t))}const L={childNodes:function(e){return O("Node",e,"childNodes")},parentNode:function(e){return O("Node",e,"parentNode")},parentElement:function(e){return O("Node",e,"parentElement")},textContent:function(e){return O("Node",e,"textContent")},contains:function(e,t){return D("Node",e,"contains")(t)},getRootNode:function(e){return D("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?O("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?O("Element",e,"shadowRoot"):null},querySelector:function(e,t){return O("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return O("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return T("MutationObserver").constructor},patch:function(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],s=r(n);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=s,()=>{e[t]=n}}catch(e){return()=>{}}}};function P(e){return e.nodeType===e.ELEMENT_NODE}function F(e){const t=e&&"host"in e&&"mode"in e&&L.host(e)||null;return Boolean(t&&"shadowRoot"in t&&L.shadowRoot(t)===e)}function U(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function B(e){try{const r=e.rules||e.cssRules;if(!r)return null;let n=e.href;!n&&e.ownerNode&&(n=e.ownerNode.baseURI);const s=Array.from(r,e=>z(e,n)).join("");return(t=s).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}var t}function z(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=B(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(r){t=e.cssText}return e.styleSheet.href?$(t,e.styleSheet.href):t}{let r=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=r.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t?$(r,t):r}}class j{constructor(){x(this,"idNodeMap",new Map),x(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function W(){return new j}function V({element:e,maskInputOptions:t,tagName:r,type:n,value:s,maskInputFn:i}){let o=s||"";const a=n&&Y(n);return(t[r.toLowerCase()]||a&&t[a])&&(o=i?i(o,e):"*".repeat(o.length)),o}function Y(e){return e.toLowerCase()}function Z(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Y(t):null}function G(e,t){var r;let n;try{n=new URL(e,null!=t?t:window.location.href)}catch(e){return null}const s=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!=(r=null==s?void 0:s[1])?r:null}const H=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,X=/^(?:[a-z+]+:)?\/\//i,J=/^www\..*/i,K=/^(data:)([^,]*),(.*)/i;function $(e,t){return(e||"").replace(H,(e,r,n,s,i,o)=>{const a=n||i||o,l=r||s||"";if(!a)return e;if(X.test(a)||J.test(a))return`url(${l}${a}${l})`;if(K.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const c=t.split("/"),h=a.split("/");c.pop();for(const e of h)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${l})`})}function Q(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function q(e,t){return function(e,t,r=!1){const n=Array.from(t.childNodes),s=[];let i=0;if(n.length>1&&e&&"string"==typeof e){let t=Q(e,r);const o=t.length/e.length;for(let a=1;a2&&""===d[0]&&""!==n[a-1].textContent)p=t.indexOf(u,1);else if(1===d.length){if(u=u.substring(0,u.length-1),d=t.split(u),d.length<=1)return s.push(e),s;h=c+1}else h===l.length-1&&(p=t.indexOf(u));if(d.length>=2&&h>c){const e=n[a-1].textContent;if(e&&"string"==typeof e){const r=Q(e).length;p=t.indexOf(u,r)}-1===p&&(p=d[0].length)}if(-1!==p){let a=Math.floor(p/o);for(;a>0&&a50*n.length)return s.push(e),s;const l=Q(e.substring(0,a),r);if(l.length===p){s.push(e.substring(0,a)),e=e.substring(a),t=t.substring(p);break}l.length=t.length);){let i=n(ie);if(","===i.slice(-1))i=le(e,i.substring(0,i.length-1)),s.push(i);else{let n="";i=le(e,i);let o=!1;for(;;){const e=t.charAt(r);if(""===e){s.push((i+n).trim());break}if(o)")"===e&&(o=!1);else{if(","===e){r+=1,s.push((i+n).trim());break}"("===e&&(o=!0)}n+=e,r+=1}}}return s.join(", ")}(e,n):"style"===r?$(n,ce(e)):"object"===t&&"data"===r?le(e,n):n:le(e,n):n}function ue(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function de(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&de(L.parentNode(e),t,r);for(let r=e.classList.length;r--;){const n=e.classList[r];if(t.test(n))return!0}return!!r&&de(L.parentNode(e),t,r)}function pe(e){return!(!e||-1===e.indexOf(":not"))}function fe(e,t,r,n){try{const s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement||function(e){var t;let r=null;return"getRootNode"in e&&(null==(t=L.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&L.host(L.getRootNode(e))&&(r=L.host(L.getRootNode(e))),r}(e);if(null===s)return pe(r);if("string"==typeof t){if(n){if(s.closest("."+t))return!0}else if(s.classList.contains(t))return!0}else if(de(s,t,n))return!0;if(r)if(n){if(pe(r))return r=`:not(${r})`,!s.closest(r);if(s.closest(r))return!0}else if(s.matches(r))return!0}catch(e){}return!1}function me(e,t){const{doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:o,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:c,maskInputFn:h,dataURLOptions:u={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:m=!1,cssCaptured:g=!1}=t,y=function(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return 1===r?void 0:r}(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:E.Document,childNodes:[],compatMode:e.compatMode}:{type:E.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:E.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){const{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:i,maskInputOptions:o={},maskInputFn:a,dataURLOptions:l={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:u,newlyAddedElement:d=!1,rootId:p}=t,f=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const n=e.classList[r];if(t.test(n))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,n,s),m=function(e){if(e instanceof HTMLFormElement)return"form";const t=Y(e.tagName||e.nodeName);return te.test(t)?"div":t}(e);let g={};const y=e.attributes.length;for(let t=0;tt.href===e.href);let n=null;t&&(n=B(t)),n&&(delete g.rel,delete g.href,g._cssText=n)}if("style"===m&&e.sheet){let t=B(e.sheet);t&&(e.childNodes.length>1&&(t=q(t,e)),g._cssText=t)}if("input"===m||"textarea"===m||"select"===m){const t=e.value,r=e.checked;"radio"!==g.type&&"checkbox"!==g.type&&t?g.value=V({element:e,type:Z(e),tagName:m,value:t,maskInputOptions:o,maskInputFn:a}):r&&(g.checked=r)}"option"===m&&(e.selected&&!o.select?g.selected=!0:delete g.selected);"dialog"===m&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===m&&h)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let r=0;r0!==e))return!1}return!0})(e)||(g.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),n=r.createElement("canvas");n.width=e.width,n.height=e.height;const s=n.toDataURL(l.type,l.quality);t!==s&&(g.rr_dataURL=t)}if("img"===m&&c){ne||(ne=r.createElement("canvas"),se=ne.getContext("2d"));const t=e,n=t.currentSrc||t.getAttribute("src")||"",s=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{ne.width=t.naturalWidth,ne.height=t.naturalHeight,se.drawImage(t,0,0),g.rr_dataURL=ne.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i));console.warn(`Cannot inline img src=${n}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(s?g.crossOrigin=s:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}if("audio"===m||"video"===m){const t=g;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}d||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop));if(f){const{width:t,height:r}=e.getBoundingClientRect();g={class:g.class,rr_width:t+"px",rr_height:r+"px",style:`width:${t}px;height:${r}px;background-image: linear-gradient(135deg, #c2c2c2 6.25%, #e5e5e5 6.25%, #e5e5e5 50%, #c2c2c2 50%, #c2c2c2 56.25%, #e5e5e5 56.25%, #e5e5e5 100%);background-size: 11.31px 11.31px;;`}}"iframe"!==m||u(g.src)||(e.contentDocument||(g.rr_src=g.src),delete g.src);let w;try{customElements.get(m)&&(w=!0)}catch(e){}return{type:E.Element,tagName:m,attributes:g,childNodes:[],isSVG:(b=e,Boolean("svg"===b.tagName||b.ownerSVGElement)||void 0),needBlock:f,rootId:p,isCustom:w};var b}(e,{doc:r,blockClass:s,blockSelector:i,inlineStylesheet:a,maskInputOptions:l,maskInputFn:h,dataURLOptions:u,inlineImages:d,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:m,rootId:y});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:n,rootId:s,cssCaptured:i}=t,o=L.parentNode(e),a=o&&o.tagName;let l="";const c="STYLE"===a||void 0,h="SCRIPT"===a||void 0;h?l="SCRIPT_PLACEHOLDER":i||(l=L.textContent(e),c&&l&&(l=$(l,ce(t.doc))));!c&&!h&&l&&r&&(l=n?n(l,L.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:E.Text,textContent:l||"",rootId:s}}(e,{doc:r,needsMask:o,maskTextFn:c,rootId:y,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:E.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:E.Comment,textContent:L.textContent(e)||"",rootId:y};default:return!1}}function ge(e){return null==e?"":e.toLowerCase()}function ye(e,t){const{doc:r,mirror:n,blockClass:s,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:u,maskInputFn:d,slimDOMOptions:p,dataURLOptions:f={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:_=(()=>!1),newlyAddedElement:C=!1,cssCaptured:k=!1}=t;let{needsMask:x}=t,{preserveWhiteSpace:I=!0}=t;const A=void 0!==x;A&&x!==pe(a)||!L.childNodes(e)||(x=fe(e,o,a,!A));const M=me(e,{doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:x,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,keepIframeSrcFn:_,newlyAddedElement:C,cssCaptured:k});if(!M)return console.warn(e,"not serialized"),null;let T;T=n.hasNode(e)?n.getId(e):function(e,t){if(t.comment&&e.type===E.Comment)return!0;if(e.type===E.Element){if("iframe"===e.tagName&&"rrweb-unmodified-iframe"===e.attributes.id)return!0;if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===G(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ge(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ge(e.attributes.name)||"icon"===ge(e.attributes.rel)||"apple-touch-icon"===ge(e.attributes.rel)||"shortcut icon"===ge(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ge(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ge(e.attributes.property).match(/^(og|twitter|fb):/)||ge(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ge(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ge(e.attributes.name)||"googlebot"===ge(e.attributes.name)||"bingbot"===ge(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ge(e.attributes.name)||"generator"===ge(e.attributes.name)||"framework"===ge(e.attributes.name)||"publisher"===ge(e.attributes.name)||"progid"===ge(e.attributes.name)||ge(e.attributes.property).match(/^article:/)||ge(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ge(e.attributes.name)||"yandex-verification"===ge(e.attributes.name)||"csrf-token"===ge(e.attributes.name)||"p:domain_verify"===ge(e.attributes.name)||"verify-v1"===ge(e.attributes.name)||"verification"===ge(e.attributes.name)||"shopify-checkout-api-token"===ge(e.attributes.name)))return!0}}return!1}(M,p)||!I&&M.type===E.Text&&!M.textContent.replace(/^\s+|\s+$/gm,"").length?-2:re();const R=Object.assign(M,{id:T});if(n.add(e,R),-2===T)return null;y&&y(e);let O=!l;if(R.type===E.Element){O=O&&!R.needBlock,delete R.needBlock;const t=L.shadowRoot(e);t&&U(t)&&(R.isShadowHost=!0)}if((R.type===E.Document||R.type===E.Element)&&O){p.headWhitespace&&R.type===E.Element&&"head"===R.tagName&&(I=!1);const t={doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:d,slimDOMOptions:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:I,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:S,keepIframeSrcFn:_,cssCaptured:!1};if(R.type===E.Element&&"textarea"===R.tagName&&void 0!==R.attributes.value);else{R.type===E.Element&&void 0!==R.attributes._cssText&&"string"==typeof R.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(L.childNodes(e))){const e=ye(r,t);e&&R.childNodes.push(e)}}let C=null;if(P(e)&&(C=L.shadowRoot(e)))for(const e of Array.from(L.childNodes(C))){const r=ye(e,t);r&&(U(C)&&(r.isShadow=!0),R.childNodes.push(r))}}const N=L.parentNode(e);return N&&F(N)&&U(N)&&(R.isShadow=!0),R.type===E.Element&&"iframe"===R.tagName&&function(e,t,r){const n=e.contentWindow;if(!n)return;let s,i=!1;try{s=n.document.readyState}catch(e){return}if("complete"!==s){const n=setTimeout(()=>{i||(t(),i=!0)},r);return void e.addEventListener("load",()=>{clearTimeout(n),i=!0,t()})}if("about:blank"!==n.location.href||"about:blank"===e.src||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=e.contentDocument;if(t&&w){const r=ye(t,{doc:t,mirror:n,blockClass:s,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:d,slimDOMOptions:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:I,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:S,keepIframeSrcFn:_});r&&w(e,r)}},b),R.type===E.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===G(R.attributes.href))&&function(e,t,r){let n,s=!1;try{n=e.sheet}catch(e){return}if(n)return;const i=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(i),s=!0,t()})}(e,()=>{if(v){const t=ye(e,{doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:d,slimDOMOptions:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:I,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:S,keepIframeSrcFn:_});t&&v(e,t)}},S),R}const we=new RegExp(/(max|min)-device-(width|height)/.source,"g"),be={postcssPlugin:"postcss-custom-selectors",prepare:()=>({postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(we)&&(e.params=e.params.replace(we,"$1-$2"))}})},ve={postcssPlugin:"postcss-hover-classes",prepare:function(){const e=[];return{Rule:function(t){-1===e.indexOf(t)&&(e.push(t),t.selectors.forEach((function(e){e.includes(":hover")&&(t.selector+=",\n"+e.replace(/:hover/g,".\\:hover"))})))}}}};function Se(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _e(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var Ce={exports:{}},ke=String,xe=function(){return{isColorSupported:!1,reset:ke,bold:ke,dim:ke,italic:ke,underline:ke,inverse:ke,hidden:ke,strikethrough:ke,black:ke,red:ke,green:ke,yellow:ke,blue:ke,magenta:ke,cyan:ke,white:ke,gray:ke,bgBlack:ke,bgRed:ke,bgGreen:ke,bgYellow:ke,bgBlue:ke,bgMagenta:ke,bgCyan:ke,bgWhite:ke}};Ce.exports=xe(),Ce.exports.createColors=xe;var Ee=Ce.exports;const Ie=_e(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ae=Ee,Me=Ie,Te=class e extends Error{constructor(t,r,n,s,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),s&&(this.source=s),o&&(this.plugin=o),void 0!==r&&void 0!==n&&("number"==typeof r?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Ae.isColorSupported),Me&&e&&(t=Me(t));let r,n,s=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,s.length),a=String(o).length;if(e){let{bold:e,gray:t,red:s}=Ae.createColors(!0);r=t=>e(s(t)),n=e=>t(e)}else r=n=e=>e;return s.slice(i,o).map((e,t)=>{let s=i+1+t,o=" "+(" "+s).slice(-a)+" | ";if(s===this.line){let t=n(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(o)+e+"\n "+t+r("^")}return" "+n(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Re=Te;Te.default=Te;var Oe={};Oe.isClean=Symbol("isClean"),Oe.my=Symbol("my");const Ne={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let De=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let s=(e.raws.between||"")+(t?";":"");this.builder(r+n+s,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n{if(n=e.raws[t],void 0!==n)return!1})}var o;return void 0===n&&(n=Ne[r]),i.rawCache[r]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Le=De;De.default=De;let Pe=Le;function Fe(e,t){new Pe(t).stringify(e)}var Ue=Fe;Fe.default=Fe;let{isClean:Be,my:ze}=Oe,je=Re,We=Le,Ve=Ue;let Ye=class{constructor(e={}){this.raws={},this[Be]=!1,this[ze]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=function e(t,r){let n=new t.constructor;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;if("proxyCache"===s)continue;let i=t[s],o=typeof i;"parent"===s&&"object"===o?r&&(n[s]=r):"source"===s?n[s]=i:Array.isArray(i)?n[s]=i.map(t=>e(t,n)):("object"===o&&null!==i&&(i=e(i)),n[s]=i)}return n}(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new je(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Be]){this[Be]=!1;let e=this;for(;e=e.parent;)e[Be]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,s=this.source.start.line;for(let t=0;t"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let i=t.get(n.input);null==i&&(i=s,t.set(n.input,s),s++),r[e]={end:n.end,inputId:i,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ve){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}};var Ze=Ye;Ye.default=Ye;let Ge=Ze,He=class extends Ge{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e=C(_({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Xe=He;He.default=He;var Je={nanoid:(e=21)=>{let t="",r=0|e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Ke,SourceMapGenerator:$e}=Ie,{existsSync:Qe,readFileSync:qe}=Ie,{dirname:et,join:tt}=Ie;let rt=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=et(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new Ke(this.text)),this.consumerCache}decodeInline(t){if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return r=t.substr(RegExp.lastMatch.length),e?e.from(r,"base64").toString():window.atob(r);var r;let n=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=et(e),Qe(e))return this.mapFile=e,qe(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Ke)return $e.fromSourceMap(t).toString();if(t instanceof $e)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=tt(et(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var nt=rt;rt.default=rt;let{SourceMapConsumer:st,SourceMapGenerator:it}=Ie,{fileURLToPath:ot,pathToFileURL:at}=Ie,{isAbsolute:lt,resolve:ct}=Ie,{nanoid:ht}=Je,ut=Ie,dt=Re,pt=nt,ft=Symbol("fromOffsetCache"),mt=Boolean(st&&it),gt=Boolean(ct&<),yt=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!gt||/^\w+:\/\//.test(t.from)||lt(t.from)?this.file=t.from:this.file=ct(t.from)),gt&&mt){let e=new pt(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let s,i,o;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);i=e.line,o=e.col}else i=n.line,o=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,i,o);return s=a?new dt(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,n.plugin):new dt(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:o,line:i},this.css,this.file,n.plugin),s.input={column:r,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(at&&(s.input.url=at(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,r;if(this[ft])r=this[ft];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let n=0,s=e.length;n=t)n=r.length-1;else{let t,s=r.length-2;for(;n>1),e=r[t+1])){n=t;break}n=t+1}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ct(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){if(!this.map)return!1;let s,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(s=o.originalPositionFor({column:n,line:r})),i=lt(a.source)?at(a.source):new URL(a.source,this.map.consumer().sourceRoot||at(this.map.mapFile));let l={column:a.column,endColumn:s&&s.column,endLine:s&&s.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!ot)throw new Error("file: protocol is not available in this PostCSS build");l.file=ot(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map=_({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var wt=yt;yt.default=yt,ut&&ut.registerInput&&ut.registerInput(yt);let{SourceMapConsumer:bt,SourceMapGenerator:vt}=Ie,{dirname:St,relative:_t,resolve:Ct,sep:kt}=Ie,{pathToFileURL:xt}=Ie,Et=wt,It=Boolean(bt&&vt),At=Boolean(St&&Ct&&_t&&kt);var Mt=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),n=e.root||St(e.file);!1===this.mapOpts.sourcesContent?(t=new bt(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),At&&It&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=vt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new vt({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new vt({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,n=1,s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(i,o,a)=>{if(this.css+=i,o&&"end"!==a&&(s.generated.line=r,s.generated.column=n-1,o.source&&o.source.start?(s.source=this.sourcePath(o),s.original.line=o.source.start.line,s.original.column=o.source.start.column-1,this.map.addMapping(s)):(s.source="",s.original.line=1,s.original.column=0,this.map.addMapping(s))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),n=i.length-t):n+=i.length,o&&"start"!==a){let e=o.parent||{raws:{}};("decl"===o.type||"atrule"===o.type&&!o.nodes)&&o===e.last&&!e.raws.semicolon||(o.source&&o.source.end?(s.source=this.sourcePath(o),s.original.line=o.source.end.line,s.original.column=o.source.end.column-1,s.generated.line=r,s.generated.column=n-2,this.map.addMapping(s)):(s.source="",s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=n-1,this.map.addMapping(s)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?St(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=St(Ct(r,this.mapOpts.annotation)));let n=_t(r,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Et(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(t){return e?e.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(xt){let t=xt(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===kt&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Tt=Ze,Rt=class extends Tt{constructor(e){super(e),this.type="comment"}};var Ot=Rt;Rt.default=Rt;let Nt,Dt,Lt,Pt,{isClean:Ft,my:Ut}=Oe,Bt=Xe,zt=Ot,jt=Ze;let Wt=class e extends jt{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of s)this.proxyOf.nodes.splice(n+1,0,e);for(let e in this.indexes)r=this.indexes[e],n(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(Nt(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Bt(t)]}else if(t.selector)t=[new Dt(t)];else if(t.name)t=[new Lt(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new zt(t)]}return t.map(t=>(t[Ut]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Ft]&&function e(t){if(t[Ft]=!1,t.proxyOf.nodes)for(let r of t.proxyOf.nodes)e(r)}(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Wt.registerParse=e=>{Nt=e},Wt.registerRule=e=>{Dt=e},Wt.registerAtRule=e=>{Lt=e},Wt.registerRoot=e=>{Pt=e};var Vt=Wt;Wt.default=Wt,Wt.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Lt.prototype):"rule"===e.type?Object.setPrototypeOf(e,Dt.prototype):"decl"===e.type?Object.setPrototypeOf(e,Bt.prototype):"comment"===e.type?Object.setPrototypeOf(e,zt.prototype):"root"===e.type&&Object.setPrototypeOf(e,Pt.prototype),e[Ut]=!0,e.nodes&&e.nodes.forEach(e=>{Wt.rebuild(e)})};let Yt,Zt,Gt=Vt,Ht=class extends Gt{constructor(e){super(_({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Yt(new Zt,this,e).stringify()}};Ht.registerLazyResult=e=>{Yt=e},Ht.registerProcessor=e=>{Zt=e};var Xt=Ht;Ht.default=Ht;let Jt=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Kt=Jt;Jt.default=Jt;let $t=Kt,Qt=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new $t(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var qt=Qt;Qt.default=Qt;const er="'".charCodeAt(0),tr='"'.charCodeAt(0),rr="\\".charCodeAt(0),nr="/".charCodeAt(0),sr="\n".charCodeAt(0),ir=" ".charCodeAt(0),or="\f".charCodeAt(0),ar="\t".charCodeAt(0),lr="\r".charCodeAt(0),cr="[".charCodeAt(0),hr="]".charCodeAt(0),ur="(".charCodeAt(0),dr=")".charCodeAt(0),pr="{".charCodeAt(0),fr="}".charCodeAt(0),mr=";".charCodeAt(0),gr="*".charCodeAt(0),yr=":".charCodeAt(0),wr="@".charCodeAt(0),br=/[\t\n\f\r "#'()/;[\\\]{}]/g,vr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Sr=/.[\r\n"'(/\\]/,_r=/[\da-f]/i;let Cr=Vt,kr=class extends Cr{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var xr=kr;kr.default=kr,Cr.registerAtRule(kr);let Er,Ir,Ar=Vt,Mr=class extends Ar{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before;return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Er(new Ir,this,e).stringify()}};Mr.registerLazyResult=e=>{Er=e},Mr.registerProcessor=e=>{Ir=e};var Tr=Mr;Mr.default=Mr,Ar.registerRoot(Mr);let Rr={comma:e=>Rr.split(e,[","],!0),space:e=>Rr.split(e,[" ","\n","\t"]),split(e,t,r){let n=[],s="",i=!1,o=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(i=!0),i?(""!==s&&n.push(s.trim()),s="",i=!1):s+=r;return(r||""!==s)&&n.push(s.trim()),n}};var Or=Rr;Rr.default=Rr;let Nr=Vt,Dr=Or,Lr=class extends Nr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Dr.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Pr=Lr;Lr.default=Lr,Nr.registerRule(Lr);let Fr=Xe,Ur=function(e,t={}){let r,n,s,i,o,a,l,c,h,u,d=e.css.valueOf(),p=t.ignoreErrors,f=d.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(m),r){case sr:case ir:case ar:case lr:case or:n=m;do{n+=1,r=d.charCodeAt(n)}while(r===ir||r===sr||r===ar||r===lr||r===or);u=["space",d.slice(m,n)],m=n-1;break;case cr:case hr:case pr:case fr:case yr:case mr:case dr:{let e=String.fromCharCode(r);u=[e,e,m];break}case ur:if(c=g.length?g.pop()[1]:"",h=d.charCodeAt(m+1),"url"===c&&h!==er&&h!==tr&&h!==ir&&h!==sr&&h!==ar&&h!==or&&h!==lr){n=m;do{if(a=!1,n=d.indexOf(")",n+1),-1===n){if(p||t){n=m;break}w("bracket")}for(l=n;d.charCodeAt(l-1)===rr;)l-=1,a=!a}while(a);u=["brackets",d.slice(m,n+1),m,n],m=n}else n=d.indexOf(")",m+1),i=d.slice(m,n+1),-1===n||Sr.test(i)?u=["(","(",m]:(u=["brackets",i,m,n],m=n);break;case er:case tr:s=r===er?"'":'"',n=m;do{if(a=!1,n=d.indexOf(s,n+1),-1===n){if(p||t){n=m+1;break}w("string")}for(l=n;d.charCodeAt(l-1)===rr;)l-=1,a=!a}while(a);u=["string",d.slice(m,n+1),m,n],m=n;break;case wr:br.lastIndex=m+1,br.test(d),n=0===br.lastIndex?d.length-1:br.lastIndex-2,u=["at-word",d.slice(m,n+1),m,n],m=n;break;case rr:for(n=m,o=!0;d.charCodeAt(n+1)===rr;)n+=1,o=!o;if(r=d.charCodeAt(n+1),o&&r!==nr&&r!==ir&&r!==sr&&r!==ar&&r!==lr&&r!==or&&(n+=1,_r.test(d.charAt(n)))){for(;_r.test(d.charAt(n+1));)n+=1;d.charCodeAt(n+1)===ir&&(n+=1)}u=["word",d.slice(m,n+1),m,n],m=n;break;default:r===nr&&d.charCodeAt(m+1)===gr?(n=d.indexOf("*/",m+2)+1,0===n&&(p||t?n=d.length:w("comment")),u=["comment",d.slice(m,n+1),m,n],m=n):(vr.lastIndex=m+1,vr.test(d),n=0===vr.lastIndex?d.length-1:vr.lastIndex-2,u=["word",d.slice(m,n+1),m,n],g.push(u),m=n)}return m++,u},position:function(){return m}}},Br=Ot,zr=xr,jr=Tr,Wr=Pr;const Vr={empty:!0,space:!0};let Yr=Vt,Zr=class{constructor(e){this.input=e,this.root=new jr,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,s=new zr;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(n=a.length-1,r=a[n];r&&"space"===r[0];)r=a[--n];r&&(s.source.end=this.getPosition(r[3]||r[2]),s.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(s.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(s,"params",a),i&&(e=a[a.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),o&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,n=0;for(let s=t-1;s>=0&&(r=e[s],"space"===r[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,n,s=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],"("===r&&(s+=1),")"===r&&(s-=1),0===s&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return i}this.doubleColon(t)}n=t}return!1}comment(e){let t=new Br;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Ur(this.input)}decl(e,t){let r=new Fr;this.init(r,e[0][2]);let n,s=e[e.length-1];for(";"===s[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(n=e.shift(),":"===n[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(n=e[t],"!important"===n[1].toLowerCase()){r.important=!0;let n=this.stringFrom(e,t);n=this.spacesFromEnd(e)+n," !important"!==n&&(r.raws.important=n);break}if("important"===n[1].toLowerCase()){let n=e.slice(0),s="";for(let e=t;e>0;e--){let t=n[e][0];if(0===s.trim().indexOf("!")&&"space"!==t)break;s=n.pop()[1]+s}0===s.trim().indexOf("!")&&(r.important=!0,r.raws.important=s,e=n)}if("space"!==n[0]&&"comment"!==n[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Wr;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,s=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)s||(s=l),i.push("("===r?")":"]");else if(o&&n&&"{"===r)s||(s=l),i.push("}");else if(0===i.length){if(";"===r){if(n)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(s),t&&n){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let s,i,o,a,l=r.length,c="",h=!0;for(let e=0;ee+t[1],"");e.raws[t]={raw:n,value:c}}e[t]=c}rule(e){e.pop();let t=new Wr;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;nun(e)),e}let dn={},pn=class e{constructor(t,r,n){let s;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof tn)s=un(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=rn;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{s=e(r,n)}catch(e){this.processed=!0,this.error=e}s&&!s[Kr]&&qr.rebuild(s)}else s=un(r);this.result=new tn(t,s,n),this.helpers=C(_({},dn),{postcss:dn,result:this.result}),this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?_(_({},e),e.prepare(this.result)):e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!on[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!an[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let e=this.visitTick(t);if(ln(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return ln(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Qr;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new $r(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(ln(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Jr];)e[Jr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(ln(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(n.length>0&&t.visitorIndex{e[Jr]||this.walkSync(e)});else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};pn.registerPostcss=e=>{dn=e};var fn=pn;pn.default=pn,nn.registerLazyResult(pn),en.registerLazyResult(pn);let mn=Mt,gn=Ue,yn=Xr;const wn=qt;let bn=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=gn;this.result=new wn(this._processor,void 0,this._opts),this.result.css=t;let s=this;Object.defineProperty(this.result,"root",{get:()=>s.root});let i=new mn(n,void 0,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=yn;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var vn=bn;bn.default=bn;let Sn=vn,_n=fn,Cn=Xt,kn=Tr,xn=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new _n(this,e,t):new Sn(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var En=xn;xn.default=xn,kn.registerProcessor(xn),Cn.registerProcessor(xn);let In=Xe,An=nt,Mn=Ot,Tn=xr,Rn=wt,On=Tr,Nn=Pr;function Dn(e,t){if(Array.isArray(e))return e.map(e=>Dn(e));let r=e,{inputs:n}=r,s=k(r,["inputs"]);if(n){t=[];for(let e of n){let r=C(_({},e),{__proto__:Rn.prototype});r.map&&(r.map=C(_({},r.map),{__proto__:An.prototype})),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>Dn(e,t))),s.source){let e=s.source,{inputId:r}=e,n=k(e,["inputId"]);s.source=n,null!=r&&(s.source.input=t[r])}if("root"===s.type)return new On(s);if("decl"===s.type)return new In(s);if("rule"===s.type)return new Nn(s);if("comment"===s.type)return new Mn(s);if("atrule"===s.type)return new Tn(s);throw new Error("Unknown node type: "+e.type)}var Ln=Dn;Dn.default=Dn;let Pn=Re,Fn=Xe,Un=fn,Bn=Vt,zn=En,jn=Ue,Wn=Ln,Vn=Xt,Yn=Kt,Zn=Ot,Gn=xr,Hn=qt,Xn=wt,Jn=Xr,Kn=Or,$n=Pr,Qn=Tr,qn=Ze;function es(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new zn(e)}es.plugin=function(e,t){let r,s=!1;function i(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),n.env.LANG&&n.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let i=t(...r);return i.postcssPlugin=e,i.postcssVersion=(new zn).version,i}return Object.defineProperty(i,"postcss",{get:()=>(r||(r=i()),r)}),i.process=function(e,t,r){return es([i(r)]).process(e,t)},i},es.stringify=jn,es.parse=Jn,es.fromJSON=Wn,es.list=Kn,es.comment=e=>new Zn(e),es.atRule=e=>new Gn(e),es.decl=e=>new Fn(e),es.rule=e=>new $n(e),es.root=e=>new Qn(e),es.document=e=>new Vn(e),es.CssSyntaxError=Pn,es.Declaration=Fn,es.Container=Bn,es.Processor=zn,es.Document=Vn,es.Comment=Zn,es.Warning=Yn,es.AtRule=Gn,es.Result=Hn,es.Input=Xn,es.Rule=$n,es.Root=Qn,es.Node=qn,Un.registerPostcss(es);var ts=es;es.default=es;const rs=Se(ts);rs.stringify,rs.fromJSON,rs.plugin,rs.parse,rs.list,rs.document,rs.comment,rs.atRule,rs.rule,rs.decl,rs.root,rs.CssSyntaxError,rs.Declaration,rs.Container,rs.Processor,rs.Document,rs.Comment,rs.Warning,rs.AtRule,rs.Result,rs.Input,rs.Rule,rs.Root,rs.Node;const ns={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function ss(e,t){const r=null==t?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let n=e;try{n=rs([be,ve]).process(e).css}catch(e){console.warn("Failed to adapt css for replay",e)}return null==t||t.stylesWithHoverClass.set(e,n),n}function is(){return{stylesWithHoverClass:new Map}}function os(e,t,r,n){const{doc:s,hackCss:i,cache:o}=n;e.childNodes.length?function(e,t,r,n){const s=[];for(const t of e.childNodes)t.type===E.Text&&s.push(t);const i=t.split("/* rr_split */");for(;i.length>1&&i.length>s.length;)i.splice(-2,2,i.slice(-2).join(""));let o="";r&&(o=ss(i.join(""),n));let a=0;for(let e=0;e2;n--){const t=i[e+1].substring(0,n),l=o.substring(a).indexOf(t);if(s=-1!==l,s){r+=l;break}}s||(r+=i[e].length),t.textContent=o.substring(a,r),a=r}else t.textContent=o.substring(a);else t.textContent=i[e]}}(e,r,i,o):(i&&(r=ss(r,o)),t.appendChild(s.createTextNode(r)))}function as(e,t){var r;const{doc:n,hackCss:s,cache:i}=t;switch(e.type){case E.Document:return n.implementation.createDocument(null,"",null);case E.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case E.Element:{const s=function(e){let t=ns[e.tagName]?ns[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);let i;e.isSVG?i=n.createElementNS("http://www.w3.org/2000/svg",s):(e.isCustom&&(null==(r=n.defaultView)?void 0:r.customElements)&&!n.defaultView.customElements.get(e.tagName)&&n.defaultView.customElements.define(e.tagName,class extends n.defaultView.HTMLElement{}),i=n.createElement(s));const o={};for(const r in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,r))continue;let a=e.attributes[r];if(("option"!==s||"selected"!==r||!1!==a)&&null!==a)if(!0===a&&(a=""),r.startsWith("rr_"))o[r]=a;else{if("string"!=typeof a);else{if("style"===s&&"_cssText"===r){os(e,i,a,t);continue}if("textarea"===s&&"value"===r){i.appendChild(n.createTextNode(a)),e.childNodes=[];continue}}try{if(e.isSVG&&"xlink:href"===r)i.setAttributeNS("http://www.w3.org/1999/xlink",r,a.toString());else if("onload"===r||"onclick"===r||"onmouse"===r.substring(0,7))i.setAttribute("_"+r,a.toString());else{if("meta"===s&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===r){i.setAttribute("csp-content",a.toString());continue}"link"===s&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===s&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===G(e.attributes.href)||("img"===s&&e.attributes.srcset&&e.attributes.rr_dataURL?i.setAttribute("rrweb-original-srcset",e.attributes.srcset):i.setAttribute(r,a.toString()))}}catch(e){}}}for(const t in o){const r=o[t];if("canvas"===s&&"rr_dataURL"===t){const e=n.createElement("img");e.onload=()=>{const t=i.getContext("2d");t&&t.drawImage(e,0,0,e.width,e.height)},e.src=r.toString(),i.RRNodeType&&(i.rr_dataURL=r.toString())}else if("img"===s&&"rr_dataURL"===t){const t=i;t.currentSrc.startsWith("data:")||(t.setAttribute("rrweb-original-src",e.attributes.src),t.src=r.toString())}if("rr_width"===t)i.style.setProperty("width",r.toString());else if("rr_height"===t)i.style.setProperty("height",r.toString());else if("rr_mediaCurrentTime"===t&&"number"==typeof r)i.currentTime=r;else if("rr_mediaState"===t)switch(r){case"played":i.play().catch(e=>console.warn("media playback error",e));break;case"paused":i.pause()}else"rr_mediaPlaybackRate"===t&&"number"==typeof r?i.playbackRate=r:"rr_mediaMuted"===t&&"boolean"==typeof r?i.muted=r:"rr_mediaLoop"===t&&"boolean"==typeof r?i.loop=r:"rr_mediaVolume"===t&&"number"==typeof r?i.volume=r:"rr_open_mode"===t&&i.setAttribute("rr_open_mode",r)}if(e.isShadowHost)if(i.shadowRoot)for(;i.shadowRoot.firstChild;)i.shadowRoot.removeChild(i.shadowRoot.firstChild);else i.attachShadow({mode:"open"});return i}case E.Text:return e.isStyle&&s?n.createTextNode(ss(e.textContent,i)):n.createTextNode(e.textContent);case E.CDATA:return n.createCDATASection(e.textContent);case E.Comment:return n.createComment(e.textContent);default:return null}}function ls(e,t){const{doc:r,mirror:n,skipChild:s=!1,hackCss:i=!0,afterAppend:o,cache:a}=t;if(n.has(e.id)){const t=n.getNode(e.id),r=n.getMeta(t);if(c=e,(l=r)&&c&&l.type===c.type&&(l.type===E.Document?l.compatMode===c.compatMode:l.type===E.DocumentType?l.name===c.name&&l.publicId===c.publicId&&l.systemId===c.systemId:l.type===E.Comment||l.type===E.Text||l.type===E.CDATA?l.textContent===c.textContent:l.type===E.Element&&l.tagName===c.tagName&&JSON.stringify(l.attributes)===JSON.stringify(c.attributes)&&l.isSVG===c.isSVG&&l.needBlock===c.needBlock))return n.getNode(e.id)}var l,c;let h=as(e,{doc:r,hackCss:i,cache:a});if(!h)return null;if(e.rootId&&n.getNode(e.rootId)!==r&&n.replace(e.rootId,r),e.type===E.Document&&(r.close(),r.open(),"BackCompat"===e.compatMode&&e.childNodes&&e.childNodes[0].type!==E.DocumentType&&(e.childNodes[0].type===E.Element&&"xmlns"in e.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===e.childNodes[0].attributes.xmlns?r.write(''):r.write('')),h=r),n.add(h,e),(e.type===E.Document||e.type===E.Element)&&!s)for(const t of e.childNodes){const s=ls(t,{doc:r,mirror:n,skipChild:!1,hackCss:i,afterAppend:o,cache:a});if(s){if(t.isShadow&&P(h)&&h.shadowRoot)h.shadowRoot.appendChild(s);else if(e.type===E.Document&&t.type==E.Element){const e=s;let t=null;e.childNodes.forEach(e=>{"BODY"===e.nodeName&&(t=e)}),t?(e.removeChild(t),h.appendChild(s),e.appendChild(t)):h.appendChild(s)}else h.appendChild(s);o&&o(s,t.id)}else console.warn("Failed to rebuild",t)}return h}function cs(e,t){const{doc:r,onVisit:n,hackCss:s=!0,afterAppend:i,cache:o,mirror:a=new j}=t,l=ls(e,{doc:r,mirror:a,skipChild:!1,hackCss:s,afterAppend:i,cache:o});return function(e,t){for(const n of e.getIds())e.has(n)&&(r=e.getNode(n),t(r));var r}(a,e=>{n&&n(e),function(e,t){const r=t.getMeta(e);if((null==r?void 0:r.type)!==E.Element)return;const n=e;for(const e in r.attributes){if(!Object.prototype.hasOwnProperty.call(r.attributes,e)||!e.startsWith("rr_"))continue;const t=r.attributes[e];"rr_scrollLeft"===e&&(n.scrollLeft=t),"rr_scrollTop"===e&&(n.scrollTop=t)}}(e,a)}),l}var hs=Object.defineProperty,us=Object.getOwnPropertySymbols,ds=Object.prototype.hasOwnProperty,ps=Object.prototype.propertyIsEnumerable,fs=(e,t,r)=>t in e?hs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ms=(e,t)=>{for(var r in t||(t={}))ds.call(t,r)&&fs(e,r,t[r]);if(us)for(var r of us(t))ps.call(t,r)&&fs(e,r,t[r]);return e},gs=(e,t,r)=>fs(e,"symbol"!=typeof t?t+"":t,r),ys=Object.defineProperty,ws=Object.defineProperties,bs=Object.getOwnPropertyDescriptors,vs=Object.getOwnPropertySymbols,Ss=Object.prototype.hasOwnProperty,_s=Object.prototype.propertyIsEnumerable,Cs=(e,t,r)=>t in e?ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ks=(e,t)=>{for(var r in t||(t={}))Ss.call(t,r)&&Cs(e,r,t[r]);if(vs)for(var r of vs(t))_s.call(t,r)&&Cs(e,r,t[r]);return e},xs=(e,t)=>ws(e,bs(t)),Es=(e,t)=>{var r={};for(var n in e)Ss.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&vs)for(var n of vs(e))t.indexOf(n)<0&&_s.call(e,n)&&(r[n]=e[n]);return r},Is=(e,t,r)=>Cs(e,"symbol"!=typeof t?t+"":t,r);function As(){return new class{constructor(){Is(this,"idNodeMap",new Map),Is(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}}function Ms(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ts(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var Rs={exports:{}},Os=String,Ns=function(){return{isColorSupported:!1,reset:Os,bold:Os,dim:Os,italic:Os,underline:Os,inverse:Os,hidden:Os,strikethrough:Os,black:Os,red:Os,green:Os,yellow:Os,blue:Os,magenta:Os,cyan:Os,white:Os,gray:Os,bgBlack:Os,bgRed:Os,bgGreen:Os,bgYellow:Os,bgBlue:Os,bgMagenta:Os,bgCyan:Os,bgWhite:Os}};Rs.exports=Ns(),Rs.exports.createColors=Ns;var Ds=Rs.exports;const Ls=Ts(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ps=Ds,Fs=Ls,Us=class e extends Error{constructor(t,r,n,s,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),s&&(this.source=s),o&&(this.plugin=o),void 0!==r&&void 0!==n&&("number"==typeof r?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Ps.isColorSupported),Fs&&e&&(t=Fs(t));let r,n,s=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,s.length),a=String(o).length;if(e){let{bold:e,gray:t,red:s}=Ps.createColors(!0);r=t=>e(s(t)),n=e=>t(e)}else r=n=e=>e;return s.slice(i,o).map((e,t)=>{let s=i+1+t,o=" "+(" "+s).slice(-a)+" | ";if(s===this.line){let t=n(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(o)+e+"\n "+t+r("^")}return" "+n(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Bs=Us;Us.default=Us;var zs={};zs.isClean=Symbol("isClean"),zs.my=Symbol("my");const js={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Ws=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let s=(e.raws.between||"")+(t?";":"");this.builder(r+n+s,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n{if(n=e.raws[t],void 0!==n)return!1})}var o;return void 0===n&&(n=js[r]),i.rawCache[r]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Vs=Ws;Ws.default=Ws;let Ys=Vs;function Zs(e,t){new Ys(t).stringify(e)}var Gs=Zs;Zs.default=Zs;let{isClean:Hs,my:Xs}=zs,Js=Bs,Ks=Vs,$s=Gs;let Qs=class{constructor(e={}){this.raws={},this[Hs]=!1,this[Xs]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=function e(t,r){let n=new t.constructor;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;if("proxyCache"===s)continue;let i=t[s],o=typeof i;"parent"===s&&"object"===o?r&&(n[s]=r):"source"===s?n[s]=i:Array.isArray(i)?n[s]=i.map(t=>e(t,n)):("object"===o&&null!==i&&(i=e(i)),n[s]=i)}return n}(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new Js(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Hs]){this[Hs]=!1;let e=this;for(;e=e.parent;)e[Hs]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,s=this.source.start.line;for(let t=0;t"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let i=t.get(n.input);null==i&&(i=s,t.set(n.input,s),s++),r[e]={end:n.end,inputId:i,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=$s){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}};var qs=Qs;Qs.default=Qs;let ei=qs,ti=class extends ei{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e=xs(ks({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var ri=ti;ti.default=ti;var ni={nanoid:(e=21)=>{let t="",r=0|e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:si,SourceMapGenerator:ii}=Ls,{existsSync:oi,readFileSync:ai}=Ls,{dirname:li,join:ci}=Ls;let hi=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=li(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new si(this.text)),this.consumerCache}decodeInline(t){if(/^data:application\/json;charset=utf-?8,/.test(t)||/^data:application\/json,/.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return r=t.substr(RegExp.lastMatch.length),e?e.from(r,"base64").toString():window.atob(r);var r;let n=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=li(e),oi(e))return this.mapFile=e,ai(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof si)return ii.fromSourceMap(t).toString();if(t instanceof ii)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=ci(li(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var ui=hi;hi.default=hi;let{SourceMapConsumer:di,SourceMapGenerator:pi}=Ls,{fileURLToPath:fi,pathToFileURL:mi}=Ls,{isAbsolute:gi,resolve:yi}=Ls,{nanoid:wi}=ni,bi=Ls,vi=Bs,Si=ui,_i=Symbol("fromOffsetCache"),Ci=Boolean(di&&pi),ki=Boolean(yi&&gi),xi=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!ki||/^\w+:\/\//.test(t.from)||gi(t.from)?this.file=t.from:this.file=yi(t.from)),ki&&Ci){let e=new Si(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let s,i,o;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);i=e.line,o=e.col}else i=n.line,o=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,i,o);return s=a?new vi(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,n.plugin):new vi(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:o,line:i},this.css,this.file,n.plugin),s.input={column:r,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(mi&&(s.input.url=mi(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,r;if(this[_i])r=this[_i];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let n=0,s=e.length;n=t)n=r.length-1;else{let t,s=r.length-2;for(;n>1),e=r[t+1])){n=t;break}n=t+1}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:yi(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){if(!this.map)return!1;let s,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(s=o.originalPositionFor({column:n,line:r})),i=gi(a.source)?mi(a.source):new URL(a.source,this.map.consumer().sourceRoot||mi(this.map.mapFile));let l={column:a.column,endColumn:s&&s.column,endLine:s&&s.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!fi)throw new Error("file: protocol is not available in this PostCSS build");l.file=fi(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map=ks({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Ei=xi;xi.default=xi,bi&&bi.registerInput&&bi.registerInput(xi);let{SourceMapConsumer:Ii,SourceMapGenerator:Ai}=Ls,{dirname:Mi,relative:Ti,resolve:Ri,sep:Oi}=Ls,{pathToFileURL:Ni}=Ls,Di=Ei,Li=Boolean(Ii&&Ai),Pi=Boolean(Mi&&Ri&&Ti&&Oi);var Fi=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),n=e.root||Mi(e.file);!1===this.mapOpts.sourcesContent?(t=new Ii(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Pi&&Li&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ai.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ai({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Ai({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,n=1,s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(i,o,a)=>{if(this.css+=i,o&&"end"!==a&&(s.generated.line=r,s.generated.column=n-1,o.source&&o.source.start?(s.source=this.sourcePath(o),s.original.line=o.source.start.line,s.original.column=o.source.start.column-1,this.map.addMapping(s)):(s.source="",s.original.line=1,s.original.column=0,this.map.addMapping(s))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),n=i.length-t):n+=i.length,o&&"start"!==a){let e=o.parent||{raws:{}};("decl"===o.type||"atrule"===o.type&&!o.nodes)&&o===e.last&&!e.raws.semicolon||(o.source&&o.source.end?(s.source=this.sourcePath(o),s.original.line=o.source.end.line,s.original.column=o.source.end.column-1,s.generated.line=r,s.generated.column=n-2,this.map.addMapping(s)):(s.source="",s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=n-1,this.map.addMapping(s)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Mi(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Mi(Ri(r,this.mapOpts.annotation)));let n=Ti(r,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Di(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(t){return e?e.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ni){let t=Ni(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Oi&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Ui=qs,Bi=class extends Ui{constructor(e){super(e),this.type="comment"}};var zi=Bi;Bi.default=Bi;let ji,Wi,Vi,Yi,{isClean:Zi,my:Gi}=zs,Hi=ri,Xi=zi,Ji=qs;let Ki=class e extends Ji{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of s)this.proxyOf.nodes.splice(n+1,0,e);for(let e in this.indexes)r=this.indexes[e],n(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(ji(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Hi(t)]}else if(t.selector)t=[new Wi(t)];else if(t.name)t=[new Vi(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Xi(t)]}return t.map(t=>(t[Gi]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Zi]&&function e(t){if(t[Zi]=!1,t.proxyOf.nodes)for(let r of t.proxyOf.nodes)e(r)}(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ki.registerParse=e=>{ji=e},Ki.registerRule=e=>{Wi=e},Ki.registerAtRule=e=>{Vi=e},Ki.registerRoot=e=>{Yi=e};var $i=Ki;Ki.default=Ki,Ki.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Vi.prototype):"rule"===e.type?Object.setPrototypeOf(e,Wi.prototype):"decl"===e.type?Object.setPrototypeOf(e,Hi.prototype):"comment"===e.type?Object.setPrototypeOf(e,Xi.prototype):"root"===e.type&&Object.setPrototypeOf(e,Yi.prototype),e[Gi]=!0,e.nodes&&e.nodes.forEach(e=>{Ki.rebuild(e)})};let Qi,qi,eo=$i,to=class extends eo{constructor(e){super(ks({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Qi(new qi,this,e).stringify()}};to.registerLazyResult=e=>{Qi=e},to.registerProcessor=e=>{qi=e};var ro=to;to.default=to;let no=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var so=no;no.default=no;let io=so,oo=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new io(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var ao=oo;oo.default=oo;const lo="'".charCodeAt(0),co='"'.charCodeAt(0),ho="\\".charCodeAt(0),uo="/".charCodeAt(0),po="\n".charCodeAt(0),fo=" ".charCodeAt(0),mo="\f".charCodeAt(0),go="\t".charCodeAt(0),yo="\r".charCodeAt(0),wo="[".charCodeAt(0),bo="]".charCodeAt(0),vo="(".charCodeAt(0),So=")".charCodeAt(0),_o="{".charCodeAt(0),Co="}".charCodeAt(0),ko=";".charCodeAt(0),xo="*".charCodeAt(0),Eo=":".charCodeAt(0),Io="@".charCodeAt(0),Ao=/[\t\n\f\r "#'()/;[\\\]{}]/g,Mo=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,To=/.[\r\n"'(/\\]/,Ro=/[\da-f]/i;let Oo=$i,No=class extends Oo{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Do=No;No.default=No,Oo.registerAtRule(No);let Lo,Po,Fo=$i,Uo=class extends Fo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before;return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Lo(new Po,this,e).stringify()}};Uo.registerLazyResult=e=>{Lo=e},Uo.registerProcessor=e=>{Po=e};var Bo=Uo;Uo.default=Uo,Fo.registerRoot(Uo);let zo={comma:e=>zo.split(e,[","],!0),space:e=>zo.split(e,[" ","\n","\t"]),split(e,t,r){let n=[],s="",i=!1,o=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(i=!0),i?(""!==s&&n.push(s.trim()),s="",i=!1):s+=r;return(r||""!==s)&&n.push(s.trim()),n}};var jo=zo;zo.default=zo;let Wo=$i,Vo=jo,Yo=class extends Wo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Vo.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Zo=Yo;Yo.default=Yo,Wo.registerRule(Yo);let Go=ri,Ho=function(e,t={}){let r,n,s,i,o,a,l,c,h,u,d=e.css.valueOf(),p=t.ignoreErrors,f=d.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(m),r){case po:case fo:case go:case yo:case mo:n=m;do{n+=1,r=d.charCodeAt(n)}while(r===fo||r===po||r===go||r===yo||r===mo);u=["space",d.slice(m,n)],m=n-1;break;case wo:case bo:case _o:case Co:case Eo:case ko:case So:{let e=String.fromCharCode(r);u=[e,e,m];break}case vo:if(c=g.length?g.pop()[1]:"",h=d.charCodeAt(m+1),"url"===c&&h!==lo&&h!==co&&h!==fo&&h!==po&&h!==go&&h!==mo&&h!==yo){n=m;do{if(a=!1,n=d.indexOf(")",n+1),-1===n){if(p||t){n=m;break}w("bracket")}for(l=n;d.charCodeAt(l-1)===ho;)l-=1,a=!a}while(a);u=["brackets",d.slice(m,n+1),m,n],m=n}else n=d.indexOf(")",m+1),i=d.slice(m,n+1),-1===n||To.test(i)?u=["(","(",m]:(u=["brackets",i,m,n],m=n);break;case lo:case co:s=r===lo?"'":'"',n=m;do{if(a=!1,n=d.indexOf(s,n+1),-1===n){if(p||t){n=m+1;break}w("string")}for(l=n;d.charCodeAt(l-1)===ho;)l-=1,a=!a}while(a);u=["string",d.slice(m,n+1),m,n],m=n;break;case Io:Ao.lastIndex=m+1,Ao.test(d),n=0===Ao.lastIndex?d.length-1:Ao.lastIndex-2,u=["at-word",d.slice(m,n+1),m,n],m=n;break;case ho:for(n=m,o=!0;d.charCodeAt(n+1)===ho;)n+=1,o=!o;if(r=d.charCodeAt(n+1),o&&r!==uo&&r!==fo&&r!==po&&r!==go&&r!==yo&&r!==mo&&(n+=1,Ro.test(d.charAt(n)))){for(;Ro.test(d.charAt(n+1));)n+=1;d.charCodeAt(n+1)===fo&&(n+=1)}u=["word",d.slice(m,n+1),m,n],m=n;break;default:r===uo&&d.charCodeAt(m+1)===xo?(n=d.indexOf("*/",m+2)+1,0===n&&(p||t?n=d.length:w("comment")),u=["comment",d.slice(m,n+1),m,n],m=n):(Mo.lastIndex=m+1,Mo.test(d),n=0===Mo.lastIndex?d.length-1:Mo.lastIndex-2,u=["word",d.slice(m,n+1),m,n],g.push(u),m=n)}return m++,u},position:function(){return m}}},Xo=zi,Jo=Do,Ko=Bo,$o=Zo;const Qo={empty:!0,space:!0};let qo=$i,ea=class{constructor(e){this.input=e,this.root=new Ko,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,s=new Jo;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(n=a.length-1,r=a[n];r&&"space"===r[0];)r=a[--n];r&&(s.source.end=this.getPosition(r[3]||r[2]),s.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(s.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(s,"params",a),i&&(e=a[a.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),o&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,n=0;for(let s=t-1;s>=0&&(r=e[s],"space"===r[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,n,s=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],"("===r&&(s+=1),")"===r&&(s-=1),0===s&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return i}this.doubleColon(t)}n=t}return!1}comment(e){let t=new Xo;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Ho(this.input)}decl(e,t){let r=new Go;this.init(r,e[0][2]);let n,s=e[e.length-1];for(";"===s[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(n=e.shift(),":"===n[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(n=e[t],"!important"===n[1].toLowerCase()){r.important=!0;let n=this.stringFrom(e,t);n=this.spacesFromEnd(e)+n," !important"!==n&&(r.raws.important=n);break}if("important"===n[1].toLowerCase()){let n=e.slice(0),s="";for(let e=t;e>0;e--){let t=n[e][0];if(0===s.trim().indexOf("!")&&"space"!==t)break;s=n.pop()[1]+s}0===s.trim().indexOf("!")&&(r.important=!0,r.raws.important=s,e=n)}if("space"!==n[0]&&"comment"!==n[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new $o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,s=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)s||(s=l),i.push("("===r?")":"]");else if(o&&n&&"{"===r)s||(s=l),i.push("}");else if(0===i.length){if(";"===r){if(n)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(s),t&&n){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let s,i,o,a,l=r.length,c="",h=!0;for(let e=0;ee+t[1],"");e.raws[t]={raw:n,value:c}}e[t]=c}rule(e){e.pop();let t=new $o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;nba(e)),e}let va={},Sa=class e{constructor(t,r,n){let s;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof ha)s=ba(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=ua;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{s=e(r,n)}catch(e){this.processed=!0,this.error=e}s&&!s[ia]&&la.rebuild(s)}else s=ba(r);this.result=new ha(t,s,n),this.helpers=xs(ks({},va),{postcss:va,result:this.result}),this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?ks(ks({},e),e.prepare(this.result)):e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!fa[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ma[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let e=this.visitTick(t);if(ga(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return ga(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=aa;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new oa(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(ga(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[sa];)e[sa]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(ga(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(n.length>0&&t.visitorIndex{e[sa]||this.walkSync(e)});else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Sa.registerPostcss=e=>{va=e};var _a=Sa;Sa.default=Sa,da.registerLazyResult(Sa),ca.registerLazyResult(Sa);let Ca=Fi,ka=Gs,xa=na;const Ea=ao;let Ia=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=ka;this.result=new Ea(this._processor,void 0,this._opts),this.result.css=t;let s=this;Object.defineProperty(this.result,"root",{get:()=>s.root});let i=new Ca(n,void 0,this._opts,t);if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=xa;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Aa=Ia;Ia.default=Ia;let Ma=Aa,Ta=_a,Ra=ro,Oa=Bo,Na=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Ta(this,e,t):new Ma(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Da=Na;Na.default=Na,Oa.registerProcessor(Na),Ra.registerProcessor(Na);let La=ri,Pa=ui,Fa=zi,Ua=Do,Ba=Ei,za=Bo,ja=Zo;function Wa(e,t){if(Array.isArray(e))return e.map(e=>Wa(e));let r=e,{inputs:n}=r,s=Es(r,["inputs"]);if(n){t=[];for(let e of n){let r=xs(ks({},e),{__proto__:Ba.prototype});r.map&&(r.map=xs(ks({},r.map),{__proto__:Pa.prototype})),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>Wa(e,t))),s.source){let e=s.source,{inputId:r}=e,n=Es(e,["inputId"]);s.source=n,null!=r&&(s.source.input=t[r])}if("root"===s.type)return new za(s);if("decl"===s.type)return new La(s);if("rule"===s.type)return new ja(s);if("comment"===s.type)return new Fa(s);if("atrule"===s.type)return new Ua(s);throw new Error("Unknown node type: "+e.type)}var Va=Wa;Wa.default=Wa;let Ya=Bs,Za=ri,Ga=_a,Ha=$i,Xa=Da,Ja=Gs,Ka=Va,$a=ro,Qa=so,qa=zi,el=Do,tl=ao,rl=Ei,nl=na,sl=jo,il=Zo,ol=Bo,al=qs;function ll(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Xa(e)}ll.plugin=function(e,t){let r,s=!1;function i(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),n.env.LANG&&n.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let i=t(...r);return i.postcssPlugin=e,i.postcssVersion=(new Xa).version,i}return Object.defineProperty(i,"postcss",{get:()=>(r||(r=i()),r)}),i.process=function(e,t,r){return ll([i(r)]).process(e,t)},i},ll.stringify=Ja,ll.parse=nl,ll.fromJSON=Ka,ll.list=sl,ll.comment=e=>new qa(e),ll.atRule=e=>new el(e),ll.decl=e=>new Za(e),ll.rule=e=>new il(e),ll.root=e=>new ol(e),ll.document=e=>new $a(e),ll.CssSyntaxError=Ya,ll.Declaration=Za,ll.Container=Ha,ll.Processor=Xa,ll.Document=$a,ll.Comment=qa,ll.Warning=Qa,ll.AtRule=el,ll.Result=tl,ll.Input=rl,ll.Rule=il,ll.Root=ol,ll.Node=al,Ga.registerPostcss(ll);var cl=ll;ll.default=ll;const hl=Ms(cl);hl.stringify,hl.fromJSON,hl.plugin,hl.parse,hl.list,hl.document,hl.comment,hl.atRule,hl.rule,hl.decl,hl.root,hl.CssSyntaxError,hl.Declaration,hl.Container,hl.Processor,hl.Document,hl.Comment,hl.Warning,hl.AtRule,hl.Result,hl.Input,hl.Rule,hl.Root,hl.Node;var ul=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(ul||{});function dl(e){const t=[];for(const r in e){const n=e[r];if("string"!=typeof n)continue;const s=yl(r);t.push(`${s}: ${n};`)}return t.join(" ")}const pl=/-([a-z])/g,fl=/^--[a-zA-Z0-9-]+$/,ml=e=>fl.test(e)?e:e.replace(pl,(e,t)=>t?t.toUpperCase():""),gl=/\B([A-Z])/g,yl=e=>e.replace(gl,"-$1").toLowerCase();class wl{constructor(...e){gs(this,"parentElement",null),gs(this,"parentNode",null),gs(this,"ownerDocument"),gs(this,"firstChild",null),gs(this,"lastChild",null),gs(this,"previousSibling",null),gs(this,"nextSibling",null),gs(this,"ELEMENT_NODE",1),gs(this,"TEXT_NODE",3),gs(this,"nodeType"),gs(this,"nodeName"),gs(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof wl))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class bl extends wl{constructor(...e){super(e),gs(this,"nodeType",9),gs(this,"nodeName","#document"),gs(this,"compatMode","CSS1Compat"),gs(this,"RRNodeType",ul.Document),gs(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===ul.Element&&"HTML"===e.tagName)||null}get body(){var e;return(null==(e=this.documentElement)?void 0:e.childNodes.find(e=>e.RRNodeType===ul.Element&&"BODY"===e.tagName))||null}get head(){var e;return(null==(e=this.documentElement)?void 0:e.childNodes.find(e=>e.RRNodeType===ul.Element&&"HEAD"===e.tagName))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===ul.Element||t===ul.DocumentType)&&this.childNodes.some(e=>e.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===ul.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=Al(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===ul.Element||r===ul.DocumentType)&&this.childNodes.some(e=>e.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===ul.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const n=Ml(this,e,t);return n.parentElement=null,n}removeChild(e){return Tl(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(''===e?t="-//W3C//DTD XHTML 1.0 Transitional//EN":''===e&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const e=this.createDocumentType("html",t,"");this.open(),this.appendChild(e)}}createDocument(e,t,r){return new bl}createDocumentType(e,t,r){const n=new vl(e,t,r);return n.ownerDocument=this,n}createElement(e){const t=new Sl(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new kl(e);return t.ownerDocument=this,t}createComment(e){const t=new xl(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new El(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class vl extends wl{constructor(e,t,r){super(),gs(this,"nodeType",10),gs(this,"RRNodeType",ul.DocumentType),gs(this,"name"),gs(this,"publicId"),gs(this,"systemId"),gs(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class Sl extends wl{constructor(e){super(),gs(this,"nodeType",1),gs(this,"RRNodeType",ul.Element),gs(this,"tagName"),gs(this,"attributes",{}),gs(this,"shadowRoot",null),gs(this,"scrollLeft"),gs(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new Il(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?function(e){const t={},r=/:(.+)/;return e.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach((function(e){if(e){const n=e.split(r);n.length>1&&(t[ml(n[0].trim())]=n[1].trim())}})),t}(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,n,s)=>{if(t.test(r))return;const i=ml(r);n?e[i]=n:delete e[i],"important"===s&&(e[i]+=" !important"),this.attributes.style=dl(e)},e.removeProperty=r=>{if(t.test(r))return"";const n=ml(r),s=e[n]||"";return delete e[n],this.attributes.style=dl(e),s},e}getAttribute(e){return void 0===this.attributes[e]?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Al(this,e)}insertBefore(e,t){return Ml(this,e,t)}removeChild(e){return Tl(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class _l extends Sl{constructor(){super(...arguments),gs(this,"currentTime"),gs(this,"volume"),gs(this,"paused"),gs(this,"muted"),gs(this,"playbackRate"),gs(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Cl extends Sl{constructor(){super(...arguments),gs(this,"tagName","DIALOG"),gs(this,"nodeName","DIALOG")}get isModal(){return"modal"===this.getAttribute("rr_open_mode")}get open(){return null!==this.getAttribute("open")}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class kl extends wl{constructor(e){super(),gs(this,"nodeType",3),gs(this,"nodeName","#text"),gs(this,"RRNodeType",ul.Text),gs(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return"RRText text="+JSON.stringify(this.data)}}class xl extends wl{constructor(e){super(),gs(this,"nodeType",8),gs(this,"nodeName","#comment"),gs(this,"RRNodeType",ul.Comment),gs(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return"RRComment text="+JSON.stringify(this.data)}}class El extends wl{constructor(e){super(),gs(this,"nodeName","#cdata-section"),gs(this,"nodeType",4),gs(this,"RRNodeType",ul.CDATA),gs(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return"RRCDATASection data="+JSON.stringify(this.data)}}class Il{constructor(e,t){if(gs(this,"onChange"),gs(this,"classes",[]),gs(this,"add",(...e)=>{for(const t of e){const e=String(t);this.classes.indexOf(e)>=0||this.classes.push(e)}this.onChange&&this.onChange(this.classes.join(" "))}),gs(this,"remove",(...e)=>{this.classes=this.classes.filter(t=>-1===e.indexOf(t)),this.onChange&&this.onChange(this.classes.join(" "))}),e){const t=e.trim().split(/\s+/);this.classes.push(...t)}this.onChange=t}}function Al(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function Ml(e,t,r){if(!r)return Al(e,t);if(r.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function Tl(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var Rl=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(Rl||{});const Ol={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Nl={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let Dl=null;function Ll(e,t,r,n=t.mirror||t.ownerDocument.mirror){e=function(e,t,r,n){var s;r.afterAppend&&!Dl&&(Dl=new WeakSet,setTimeout(()=>{Dl=null},0));if(!Ul(e,t)){const i=Fl(t,r.mirror,n);null==(s=e.parentNode)||s.replaceChild(i,e),e=i}switch(t.RRNodeType){case ul.Document:if(!Bl(e,t,r.mirror,n)){const s=n.getMeta(t);s&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,s),null==Dl||Dl.add(e))}break;case ul.Element:{const s=e,i=t;switch(i.tagName){case"IFRAME":{const s=e.contentDocument;if(!s)break;Ll(s,t.contentDocument,r,n);break}}i.shadowRoot&&(s.shadowRoot||s.attachShadow({mode:"open"}),Pl(s.shadowRoot,i.shadowRoot,r,n)),function(e,t,r){const n=e.attributes,s=t.attributes;for(const n in s){const i=s[n],o=r.getMeta(t);if((null==o?void 0:o.isSVG)&&Ol[n])e.setAttributeNS(Ol[n],n,i);else if("CANVAS"===t.tagName&&"rr_dataURL"===n){const t=document.createElement("img");t.src=i,t.onload=()=>{const r=e.getContext("2d");r&&r.drawImage(t,0,0,t.width,t.height)}}else{if("IFRAME"===t.tagName&&"srcdoc"===n)continue;try{e.setAttribute(n,i)}catch(e){console.warn(e)}}}for(const{name:t}of Array.from(n))t in s||e.removeAttribute(t);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}(s,i,n);break}}return e}(e,t,r,n),Pl(e,t,r,n),function(e,t,r){var n;switch(t.RRNodeType){case ul.Document:{const e=t.scrollData;e&&r.applyScroll(e,!0);break}case ul.Element:{const n=e,s=t;switch(s.scrollData&&r.applyScroll(s.scrollData,!0),s.inputData&&r.applyInput(s.inputData),s.tagName){case"AUDIO":case"VIDEO":{const t=e,r=s;void 0!==r.paused&&(r.paused?t.pause():t.play()),void 0!==r.muted&&(t.muted=r.muted),void 0!==r.volume&&(t.volume=r.volume),void 0!==r.currentTime&&(t.currentTime=r.currentTime),void 0!==r.playbackRate&&(t.playbackRate=r.playbackRate),void 0!==r.loop&&(t.loop=r.loop);break}case"CANVAS":{const s=t;if(null!==s.rr_dataURL){const e=document.createElement("img");e.onload=()=>{const t=n.getContext("2d");t&&t.drawImage(e,0,0,e.width,e.height)},e.src=s.rr_dataURL}s.canvasMutations.forEach(t=>r.applyCanvas(t.event,t.mutation,e));break}case"STYLE":{const e=n.sheet;e&&t.rules.forEach(t=>r.applyStyleSheetMutation(t,e));break}case"DIALOG":{const e=n,t=s,r=e.open,i=e.matches("dialog:modal"),o=t.open,a=t.isModal,l=i!==a,c=r!==o;if((l||r&&c)&&e.close(),o&&(c||l))try{a?e.showModal():e.show()}catch(e){console.warn(e)}break}}break}case ul.Text:case ul.Comment:case ul.CDATA:e.textContent!==t.data&&(e.textContent=t.data)}(null==Dl?void 0:Dl.has(e))&&(Dl.delete(e),null==(n=r.afterAppend)||n.call(r,e,r.mirror.getId(e)))}(e,t,r)}function Pl(e,t,r,n){const s=Array.from(e.childNodes),i=t.childNodes;if(0===s.length&&0===i.length)return;let o=0,a=s.length-1,l=0,c=i.length-1,h=s[o],u=s[a],d=i[l],p=i[c],f=void 0,m=void 0;for(;o<=a&&l<=c;)if(void 0===h)h=s[++o];else if(void 0===u)u=s[--a];else if(Bl(h,d,r.mirror,n))h=s[++o],d=i[++l];else if(Bl(u,p,r.mirror,n))u=s[--a],p=i[--c];else if(Bl(h,p,r.mirror,n)){try{e.insertBefore(h,u.nextSibling)}catch(e){console.warn(e)}h=s[++o],p=i[--c]}else if(Bl(u,d,r.mirror,n)){try{e.insertBefore(u,h)}catch(e){console.warn(e)}u=s[--a],d=i[++l]}else{if(!f){f={};for(let e=o;e<=a;e++){const t=s[e];t&&r.mirror.hasNode(t)&&(f[r.mirror.getId(t)]=e)}}m=f[n.getId(d)];const t=s[m];if(void 0!==m&&t&&Bl(t,d,r.mirror,n)){try{e.insertBefore(t,h)}catch(e){console.warn(e)}s[m]=void 0}else{const t=Fl(d,r.mirror,n);"#document"===e.nodeName&&h&&(t.nodeType===t.DOCUMENT_TYPE_NODE&&h.nodeType===h.DOCUMENT_TYPE_NODE||t.nodeType===t.ELEMENT_NODE&&h.nodeType===h.ELEMENT_NODE)&&(e.removeChild(h),r.mirror.removeNodeFromMap(h),h=s[++o]);try{e.insertBefore(t,h||null)}catch(e){console.warn(e)}}d=i[++l]}if(o>a){const t=i[c+1];let s=null;for(t&&(s=r.mirror.getNode(n.getId(t)));l<=c;++l){const t=Fl(i[l],r.mirror,n);try{e.insertBefore(t,s)}catch(e){console.warn(e)}}}else if(l>c)for(;o<=a;o++){const t=s[o];if(t&&t.parentNode===e)try{e.removeChild(t),r.mirror.removeNodeFromMap(t)}catch(e){console.warn(e)}}let g=e.firstChild,y=t.firstChild;for(;null!==g&&null!==y;)Ll(g,y,r,n),g=g.nextSibling,y=y.nextSibling}function Fl(e,t,r){const n=r.getId(e),s=r.getMeta(e);let i=null;if(n>-1&&(i=t.getNode(n)),null!==i&&Ul(i,e))return i;switch(e.RRNodeType){case ul.Document:i=new Document;break;case ul.DocumentType:i=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case ul.Element:{let t=e.tagName.toLowerCase();t=Nl[t]||t,i=s&&"isSVG"in s&&(null==s?void 0:s.isSVG)?document.createElementNS(Ol.svg,t):document.createElement(e.tagName);break}case ul.Text:i=document.createTextNode(e.data);break;case ul.Comment:i=document.createComment(e.data);break;case ul.CDATA:i=document.createCDATASection(e.data)}s&&t.add(i,ms({},s));try{null==Dl||Dl.add(i)}catch(e){}return i}function Ul(e,t){return e.nodeType===t.nodeType&&(e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName)}function Bl(e,t,r,n){const s=r.getId(e),i=n.getId(t);return-1!==s&&s===i&&Ul(e,t)}class zl extends bl{constructor(e){super(),gs(this,"UNSERIALIZED_STARTING_ID",-2),gs(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),gs(this,"mirror",new Ql),gs(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new zl}createDocumentType(e,t,r){const n=new jl(e,t,r);return n.ownerDocument=this,n}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new Vl(t);break;case"IFRAME":r=new Hl(t,this.mirror);break;case"CANVAS":r=new Zl(t);break;case"STYLE":r=new Gl(t);break;case"DIALOG":r=new Yl(t);break;default:r=new Wl(t)}return r.ownerDocument=this,r}createComment(e){const t=new Jl(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Kl(e);return t.ownerDocument=this,t}createTextNode(e){const t=new Xl(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const jl=vl;class Wl extends Sl{constructor(){super(...arguments),gs(this,"inputData",null),gs(this,"scrollData",null)}}class Vl extends _l{}class Yl extends Cl{}class Zl extends Wl{constructor(){super(...arguments),gs(this,"rr_dataURL",null),gs(this,"canvasMutations",[])}getContext(){return null}}class Gl extends Wl{constructor(){super(...arguments),gs(this,"rules",[])}}class Hl extends Wl{constructor(e,t){super(e),gs(this,"contentDocument",new zl),this.contentDocument.mirror=t}}const Xl=kl,Jl=xl,Kl=El;function $l(e,t,r,n){let s;switch(e.nodeType){case Rl.DOCUMENT_NODE:n&&"IFRAME"===n.nodeName?s=n.contentDocument:(s=t,s.compatMode=e.compatMode);break;case Rl.DOCUMENT_TYPE_NODE:{const r=e;s=t.createDocumentType(r.name,r.publicId,r.systemId);break}case Rl.ELEMENT_NODE:{const r=e,n=(i=r)instanceof HTMLFormElement?"FORM":i.tagName.toUpperCase();s=t.createElement(n);const o=s;for(const{name:e,value:t}of Array.from(r.attributes))o.attributes[e]=t;r.scrollLeft&&(o.scrollLeft=r.scrollLeft),r.scrollTop&&(o.scrollTop=r.scrollTop);break}case Rl.TEXT_NODE:s=t.createTextNode(e.textContent||"");break;case Rl.CDATA_SECTION_NODE:s=t.createCDATASection(e.data);break;case Rl.COMMENT_NODE:s=t.createComment(e.textContent||"");break;case Rl.DOCUMENT_FRAGMENT_NODE:s=n.attachShadow({mode:"open"});break;default:return null}var i;let o=r.getMeta(e);return t instanceof zl&&(o||(o=ql(s,t.unserializedId),r.add(e,o)),t.mirror.add(s,ms({},o))),s}class Ql{constructor(){gs(this,"idNodeMap",new Map),gs(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function ql(e,t){switch(e.RRNodeType){case ul.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case ul.DocumentType:{const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case ul.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case ul.Text:case ul.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case ul.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}const ec={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},tc={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},rc={};function nc(e){if(rc[e])return rc[e];const t=globalThis[e],r=t.prototype,n=e in ec?ec[e]:void 0,s=Boolean(n&&n.every(e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),i=e in tc?tc[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(s&&o&&!globalThis.Zone)return rc[e]=t.prototype,t.prototype;try{let n=document.getElementById("rrweb-unmodified-iframe");n||(n=document.createElement("iframe"),n.id="rrweb-unmodified-iframe",n.style.display="none",document.body.appendChild(n));const s=n.contentWindow;if(!s)return t.prototype;const i=s[e].prototype;return i?rc[e]=i:r}catch(e){return r}}const sc={};function ic(e,t,r){var n;const s=`${e}.${String(r)}`;if(sc[s])return sc[s].call(t);const i=nc(e),o=null==(n=Object.getOwnPropertyDescriptor(i,r))?void 0:n.get;return o?(sc[s]=o,o.call(t)):t[r]}const oc={};function ac(e,t,r){const n=`${e}.${String(r)}`;if(oc[n])return oc[n].bind(t);const s=nc(e)[r];return"function"!=typeof s?t[r]:(oc[n]=s,s.bind(t))}function lc(){return nc("MutationObserver").constructor}function cc(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],s=r(n);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=s,()=>{e[t]=n}}catch(e){return()=>{}}}const hc={childNodes:function(e){return ic("Node",e,"childNodes")},parentNode:function(e){return ic("Node",e,"parentNode")},parentElement:function(e){return ic("Node",e,"parentElement")},textContent:function(e){return ic("Node",e,"textContent")},contains:function(e,t){return ac("Node",e,"contains")(t)},getRootNode:function(e){return ac("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?ic("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?ic("Element",e,"shadowRoot"):null},querySelector:function(e,t){return ic("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return ic("Element",e,"querySelectorAll")(t)},mutationObserver:lc,patch:cc};function uc(e,t,r=document){const n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}const dc="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let pc={map:{},getId:()=>(console.error(dc),-1),getNode:()=>(console.error(dc),null),removeNodeFromMap(){console.error(dc)},has:()=>(console.error(dc),!1),reset(){console.error(dc)}};function fc(e,t,r={}){let n=null,s=0;return function(...i){const o=Date.now();s||!1!==r.leading||(s=o);const a=t-(o-s),l=this;a<=0||a>t?(n&&(clearTimeout(n),n=null),s=o,e.apply(l,i)):n||!1===r.trailing||(n=setTimeout(()=>{s=!1===r.leading?0:Date.now(),n=null,e.apply(l,i)},a))}}function mc(e,t,r,n,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,n?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>mc(e,t,i||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(pc=new Proxy(pc,{get:(e,t,r)=>("map"===t&&console.error(dc),Reflect.get(e,t,r))}));let gc=Date.now;function yc(e){var t,r,n,s;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=hc.parentElement(i.body))?void 0:t.scrollLeft)||(null==(r=null==i?void 0:i.body)?void 0:r.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(n=hc.parentElement(i.body))?void 0:n.scrollTop)||(null==(s=null==i?void 0:i.body)?void 0:s.scrollTop)||0}}function wc(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function bc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function vc(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:hc.parentElement(e)}function Sc(e,t,r,n){if(!e)return!1;const s=vc(e);if(!s)return!1;try{if("string"==typeof t){if(s.classList.contains(t))return!0;if(n&&null!==s.closest("."+t))return!0}else if(de(s,t,n))return!0}catch(e){}if(r){if(s.matches(r))return!0;if(n&&null!==s.closest(r))return!0}return!1}function _c(e,t){return-1!==t.getId(e)}function Cc(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function kc(e,t){if(F(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const n=hc.parentNode(e);return(!n||n.nodeType!==e.DOCUMENT_NODE)&&(!n||kc(n,t))}function xc(e){return Boolean(e.changedTouches)}function Ec(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Ic(e){const t={},r=(e,r)=>{const n={value:e,parent:r,children:[]};return t[e.node.id]=n,n},n=[];for(const s of e){const{nextId:e,parentId:i}=s;if(e&&e in t){const i=t[e];if(i.parent){const e=i.parent.children.indexOf(i);i.parent.children.splice(e,0,r(s,i.parent))}else{const e=n.indexOf(i);n.splice(e,0,r(s,null))}}else if(i in t){const e=t[i];e.children.push(r(s,e))}else n.push(r(s,null))}return n}function Ac(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)Ac(e.children[r],t)}function Mc(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Tc(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Rc(e,t){var r,n;const s=null==(n=null==(r=e.ownerDocument)?void 0:r.defaultView)?void 0:n.frameElement;if(!s||s===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const i=s.getBoundingClientRect(),o=Rc(s,t),a=i.height/s.clientHeight;return{x:i.x*o.relativeScale+o.x,y:i.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function Oc(e){return!!e&&(e instanceof wl&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(hc.shadowRoot(e)))}function Nc(e,t){const r=e[t[0]];return 1===t.length?r:Nc(r.cssRules[t[1]].cssRules,t.slice(2))}function Dc(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Lc(e){const t=new Set,r=[];for(let n=e.length;n--;){const s=e[n];t.has(s.id)||(r.push(s),t.add(s.id))}return r}/[1-9][0-9]{12}/.test(Date.now().toString())||(gc=()=>(new Date).getTime());class Pc{constructor(){f(this,"id",1),f(this,"styleIDMap",new WeakMap),f(this,"idStyleMap",new Map)}getId(e){var t;return null!=(t=this.styleIDMap.get(e))?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Fc(e){var t;let r=null;return"getRootNode"in e&&(null==(t=hc.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&hc.host(hc.getRootNode(e))&&(r=hc.host(hc.getRootNode(e))),r}function Uc(e){let t,r=e;for(;t=Fc(r);)r=t;return r}function Bc(e){const t=e.ownerDocument;if(!t)return!1;const r=Uc(e);return hc.contains(t,r)}function zc(e){const t=e.ownerDocument;return!!t&&(hc.contains(t,e)||Bc(e))}const jc=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Pc,get _mirror(){return pc},closestElementOfNode:vc,getBaseDimension:Rc,getNestedRule:Nc,getPositionsAndIndex:Dc,getRootShadowHost:Uc,getShadowHost:Fc,getWindowHeight:wc,getWindowScroll:yc,getWindowWidth:bc,hasShadowRoot:Oc,hookSetter:mc,inDom:zc,isAncestorRemoved:kc,isBlocked:Sc,isIgnored:Cc,isSerialized:_c,isSerializedIframe:Mc,isSerializedStylesheet:Tc,iterateResolveTree:Ac,legacy_isTouchEvent:xc,get nowTimestamp(){return gc},on:uc,polyfill:Ec,queueToResolveTrees:Ic,shadowHostInDom:Bc,throttle:fc,uniqueTextMutations:Lc},Symbol.toStringTag,{value:"Module"}));var Wc=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Wc||{}),Vc=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Vc||{}),Yc=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Yc||{}),Zc=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Zc||{}),Gc=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Gc||{}),Hc=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Hc||{}),Xc=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(Xc||{}),Jc=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Jc||{});function Kc(e){return"__ln"in e}class $c{constructor(){f(this,"length",0),f(this,"head",null),f(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r`${e}@${t}`;class qc{constructor(){f(this,"frozen",!1),f(this,"locked",!1),f(this,"texts",[]),f(this,"attributes",[]),f(this,"attributeMap",new WeakMap),f(this,"removes",[]),f(this,"mapRemoves",[]),f(this,"movedMap",{}),f(this,"addedSet",new Set),f(this,"movedSet",new Set),f(this,"droppedSet",new Set),f(this,"removesSubTreeCache",new Set),f(this,"mutationCb"),f(this,"blockClass"),f(this,"blockSelector"),f(this,"maskTextClass"),f(this,"maskTextSelector"),f(this,"inlineStylesheet"),f(this,"maskInputOptions"),f(this,"maskTextFn"),f(this,"maskInputFn"),f(this,"keepIframeSrcFn"),f(this,"recordCanvas"),f(this,"inlineImages"),f(this,"slimDOMOptions"),f(this,"dataURLOptions"),f(this,"doc"),f(this,"mirror"),f(this,"iframeManager"),f(this,"stylesheetManager"),f(this,"shadowDomManager"),f(this,"canvasManager"),f(this,"processedNodeManager"),f(this,"unattachedDoc"),f(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),f(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new $c,n=e=>{let t=e,r=-2;for(;-2===r;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r},s=s=>{const i=hc.parentNode(s);if(!i||!zc(s))return;let o=!1;if(s.nodeType===Node.TEXT_NODE){const e=i.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(i)&&(o=!0)}const a=F(i)?this.mirror.getId(Fc(s)):this.mirror.getId(i),l=n(s);if(-1===a||-1===l)return r.addNode(s);const c=ye(s,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Mc(e,this.mirror)&&this.iframeManager.addIframe(e),Tc(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Oc(s)&&this.shadowDomManager.addShadowRoot(hc.shadowRoot(s),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:o});c&&(e.push({parentId:a,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)(!th(this.removesSubTreeCache,e,this.mirror)||this.movedSet.has(hc.parentNode(e))||this.addedSet.has(hc.parentNode(e)))&&s(e);for(const e of this.addedSet)rh(this.droppedSet,e)||th(this.removesSubTreeCache,e,this.mirror)?rh(this.movedSet,e)?s(e):this.droppedSet.add(e):s(e);let i=null;for(;r.length;){let e=null;if(i){const t=this.mirror.getId(hc.parentNode(i.value)),r=n(i.value);-1!==t&&-1!==r&&(e=i)}if(!e){let t=r.tail;for(;t;){const r=t;if(t=t.previous,r){const t=this.mirror.getId(hc.parentNode(r.value));if(-1===n(r.value))continue;if(-1!==t){e=r;break}{const t=r.value,n=hc.parentNode(t);if(n&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=hc.host(n);if(-1!==this.mirror.getId(t)){e=r;break}}}}}}if(!e){for(;r.head;){const e=r.head.value;r.removeNode(e),this.processedNodeManager.remove(e,this)}break}i=e.previous,r.removeNode(e.value),s(e.value)}const o={texts:this.texts.map(e=>{const t=e.node,r=hc.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{const{attributes:t}=e;if("string"==typeof t.style){const r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.length!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(o.texts.length||o.attributes.length||o.removes.length||o.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(o))}),f(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(hc.childNodes(e),e=>hc.textContent(e)||"").join("");t.attributes.value=V({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Z(e),value:r,maskInputFn:this.maskInputFn})}),f(this,"processMutation",e=>{if(!Cc(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=hc.textContent(e.target);Sc(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:fe(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,vc(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,n=e.target.getAttribute(r);if("value"===r){const e=Z(t);n=V({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:n,maskInputFn:this.maskInputFn})}if(Sc(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let s=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(n)){if(t.contentDocument)return;r="rr_src"}if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!ue(t.tagName,r))if(s.attributes[r]=he(this.doc,Y(t.tagName),Y(r),n),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const n=t.style.getPropertyValue(e),i=t.style.getPropertyPriority(e);n!==r.style.getPropertyValue(e)||i!==r.style.getPropertyPriority(e)?s.styleDiff[e]=""===i?n:[n,i]:s._unchangedStyles[e]=[n,i]}for(const e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(s.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?s.attributes.rr_open_mode="modal":s.attributes.rr_open_mode="non-modal");break}case"childList":if(Sc(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),n=F(e.target)?this.mirror.getId(hc.host(e.target)):this.mirror.getId(e.target);Sc(e.target,this.blockClass,this.blockSelector,!1)||Cc(t,this.mirror,this.slimDOMOptions)||!_c(t,this.mirror)||(this.addedSet.has(t)?(eh(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||kc(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Qc(r,n)]?eh(this.movedSet,t):(this.removes.push({parentId:n,id:r,isShadow:!(!F(e.target)||!U(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),hc.childNodes(e).forEach(e=>r.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),f(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Cc(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[Qc(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Sc(e,this.blockClass,this.blockSelector,!1)||(hc.childNodes(e).forEach(e=>this.genAdds(e)),Oc(e)&&hc.childNodes(hc.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function eh(e,t){e.delete(t),hc.childNodes(t).forEach(t=>eh(e,t))}function th(e,t,r){return 0!==e.size&&function(e,t,r){const n=hc.parentNode(t);return!!n&&e.has(n)}(e,t)}function rh(e,t){return 0!==e.size&&function e(t,r){const n=hc.parentNode(r);if(!n)return!1;if(t.has(n))return!0;return e(t,n)}(e,t)}let nh;const sh=e=>{if(!nh)return e;return(...t)=>{try{return e(...t)}catch(e){if(nh&&!0===nh(e))return;throw e}}},ih=[];function oh(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function ah(e,t){const r=new qc;ih.push(r),r.init(e);const n=new(lc())(sh(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function lh({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const o=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,a=[];let l=null;return Object.keys(Yc).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]).forEach(i=>{let o=Y(i);const c=(t=>i=>{const o=oh(i);if(Sc(o,n,s,!0))return;let a=null,c=t;if("pointerType"in i){switch(i.pointerType){case"mouse":a=Zc.Mouse;break;case"touch":a=Zc.Touch;break;case"pen":a=Zc.Pen}a===Zc.Touch?Yc[t]===Yc.MouseDown?c="TouchStart":Yc[t]===Yc.MouseUp&&(c="TouchEnd"):Zc.Pen}else xc(i)&&(a=Zc.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===Zc.Touch||c.startsWith("Mouse")&&a===Zc.Mouse)&&(a=null)):Yc[t]===Yc.Click&&(a=l,l=null);const h=xc(i)?i.changedTouches[0]:i;if(!h)return;const u=r.getId(o),{clientX:p,clientY:f}=h;sh(e)(d({type:Yc[c],id:u,x:p,y:f},null!==a&&{pointerType:a}))})(i);if(window.PointerEvent)switch(Yc[i]){case Yc.MouseDown:case Yc.MouseUp:o=o.replace("mouse","pointer");break;case Yc.TouchStart:case Yc.TouchEnd:return}a.push(uc(o,c,t))}),sh(()=>{a.forEach(e=>e())})}function ch({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,sampling:i}){return uc("scroll",sh(fc(sh(i=>{const o=oh(i);if(!o||Sc(o,n,s,!0))return;const a=r.getId(o);if(o===t&&t.defaultView){const r=yc(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}),i.scroll||100)),t)}const hh=["INPUT","TEXTAREA","SELECT"],uh=new WeakMap;function dh(e){return function(e,t){if(gh("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||gh("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||gh("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||gh("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){const r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function ph(e,t,r){let n,s;return e?(e.ownerNode?n=t.getId(e.ownerNode):s=r.getId(e),{styleId:s,id:n}):{}}function fh({mirror:e,stylesheetManager:t},r){var n,s,i;let o=null;o="#document"===r.nodeName?e.getId(r):e.getId(hc.host(r));const a="#document"===r.nodeName?null==(n=r.defaultView)?void 0:n.Document:null==(i=null==(s=r.ownerDocument)?void 0:s.defaultView)?void 0:i.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&a&&l?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var r;const n=null==(r=l.set)?void 0:r.call(this,e);if(null!==o&&-1!==o)try{t.adoptStyleSheets(e,o)}catch(e){}return n}}),sh(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function mh(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};let n;!function(e,t){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:s,scrollCb:i,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:u,fontCb:d,selectionCb:p,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),n(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),s(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),i(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),o(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),h(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),u(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),d(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(n=ah(e,e.doc));const s=function({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(!1===t.mousemove)return()=>{};const s="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let o,a=[];const l=fc(sh(t=>{const r=Date.now()-o;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],o=null}),i),c=sh(fc(sh(e=>{const t=oh(e),{clientX:r,clientY:s}=xc(e)?e.changedTouches[0]:e;o||(o=gc()),a.push({x:r,y:s,id:n.getId(t),timeOffset:gc()-o}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?Vc.Drag:e instanceof MouseEvent?Vc.MouseMove:Vc.TouchMove)}),s,{trailing:!1})),h=[uc("mousemove",c,r),uc("touchmove",c,r),uc("drag",c,r)];return sh(()=>{h.forEach(e=>e())})}(e),i=lh(e),o=ch(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,n=-1;return uc("resize",sh(fc(sh(()=>{const t=wc(),s=bc();r===t&&n===s||(e({width:Number(s),height:Number(t)}),r=t,n=s)}),200)),t)}(e,{win:r}),l=function({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,ignoreClass:i,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:h}){function u(e){let r=oh(e);const c=e.isTrusted,u=r&&r.tagName;if(r&&"OPTION"===u&&(r=hc.parentElement(r)),!r||!u||hh.indexOf(u)<0||Sc(r,n,s,!0))return;if(r.classList.contains(i)||o&&r.matches(o))return;let d=r.value,p=!1;const m=Z(r)||"";"radio"===m||"checkbox"===m?p=r.checked:(a[u.toLowerCase()]||a[m])&&(d=V({element:r,maskInputOptions:a,tagName:u,type:m,value:d,maskInputFn:l})),f(r,h?{text:d,isChecked:p,userTriggered:c}:{text:d,isChecked:p});const g=r.name;"radio"===m&&g&&p&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==r){const t=e.value;f(e,h?{text:t,isChecked:!p,userTriggered:!1}:{text:t,isChecked:!p})}})}function f(t,n){const s=uh.get(t);if(!s||s.text!==n.text||s.isChecked!==n.isChecked){uh.set(t,n);const s=r.getId(t);sh(e)(p(d({},n),{id:s}))}}const m=("last"===c.input?["change"]:["input","change"]).map(e=>uc(e,sh(u),t)),g=t.defaultView;if(!g)return()=>{m.forEach(e=>e())};const y=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),w=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return y&&y.set&&m.push(...w.map(e=>mc(e[0],e[1],{set(){sh(u)({target:this,isTrusted:!1})}},!1,g))),sh(()=>{m.forEach(e=>e())})}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:s,doc:i}){const o=sh(i=>fc(sh(s=>{const o=oh(s);if(!o||Sc(o,t,r,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:h,loop:u}=o;e({type:i,id:n.getId(o),currentTime:a,volume:l,muted:c,playbackRate:h,loop:u})}),s.media||500)),a=[uc("play",o(Hc.Play),i),uc("pause",o(Hc.Pause),i),uc("seeked",o(Hc.Seeked),i),uc("volumechange",o(Hc.VolumeChange),i),uc("ratechange",o(Hc.RateChange),i)];return sh(()=>{a.forEach(e=>e())})}(e);let h=()=>{},u=()=>{},f=()=>{},m=()=>{};e.recordDOM&&(h=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const s=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:sh((n,s,i)=>{const[o,a]=i,{id:l,styleId:c}=ph(s,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:a}]}),n.apply(s,i)})}),n.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){const s=`${e} { ${t} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[s,r])};const i=n.CSSStyleSheet.prototype.deleteRule;let o,a;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:sh((n,s,i)=>{const[o]=i,{id:a,styleId:l}=ph(s,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),n.apply(s,i)})}),n.CSSStyleSheet.prototype.removeRule=function(e){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},n.CSSStyleSheet.prototype.replace&&(o=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:sh((n,s,i)=>{const[o]=i,{id:a,styleId:l}=ph(s,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),n.apply(s,i)})})),n.CSSStyleSheet.prototype.replaceSync&&(a=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:sh((n,s,i)=>{const[o]=i,{id:a,styleId:l}=ph(s,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),n.apply(s,i)})}));const l={};yh("CSSGroupingRule")?l.CSSGroupingRule=n.CSSGroupingRule:(yh("CSSMediaRule")&&(l.CSSMediaRule=n.CSSMediaRule),yh("CSSConditionRule")&&(l.CSSConditionRule=n.CSSConditionRule),yh("CSSSupportsRule")&&(l.CSSSupportsRule=n.CSSSupportsRule));const c={};return Object.entries(l).forEach(([n,s])=>{c[n]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(c[n].insertRule,{apply:sh((n,s,i)=>{const[o,a]=i,{id:l,styleId:c}=ph(s.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:[...dh(s),a||0]}]}),n.apply(s,i)})}),s.prototype.deleteRule=new Proxy(c[n].deleteRule,{apply:sh((n,s,i)=>{const[o]=i,{id:a,styleId:l}=ph(s.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...dh(s),o]}]}),n.apply(s,i)})})}),sh(()=>{n.CSSStyleSheet.prototype.insertRule=s,n.CSSStyleSheet.prototype.deleteRule=i,o&&(n.CSSStyleSheet.prototype.replace=o),a&&(n.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}(e,{win:r}),u=fh(e,e.doc),f=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:sh((s,o,a)=>{var l;const[c,h,u]=a;if(r.has(c))return i.apply(o,[c,h,u]);const{id:d,styleId:p}=ph(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,n.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:h,priority:u},index:dh(o.parentRule)}),s.apply(o,a)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:sh((s,i,a)=>{var l;const[c]=a;if(r.has(c))return o.apply(i,[c]);const{id:h,styleId:u}=ph(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&e({id:h,styleId:u,remove:{property:c},index:dh(i.parentRule)}),s.apply(i,a)})}),sh(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:r}),e.collectFonts&&(m=function({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],s=new WeakMap,i=r.FontFace;r.FontFace=function(e,t,r){const n=new i(e,t,r);return s.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};const o=cc(t.fonts,"add",(function(t){return function(r){return setTimeout(sh(()=>{const t=s.get(r);t&&(e(t),s.delete(r))}),0),t.apply(this,[r])}}));return n.push(()=>{r.FontFace=i}),n.push(o),sh(()=>{n.forEach(e=>e())})}(e)));const g=function(e){const{doc:t,mirror:r,blockClass:n,blockSelector:s,selectionCb:i}=e;let o=!0;const a=sh(()=>{const e=t.getSelection();if(!e||o&&(null==e?void 0:e.isCollapsed))return;o=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t{}}(e),w=[];for(const t of e.plugins)w.push(t.observer(t.callback,r,t.options));return sh(()=>{ih.forEach(e=>e.reset()),null==n||n.disconnect(),s(),i(),o(),a(),l(),c(),h(),u(),f(),m(),g(),y(),w.forEach(e=>e())})}function gh(e){return void 0!==window[e]}function yh(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class wh{constructor(e){f(this,"iframeIdToRemoteIdMap",new WeakMap),f(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,n){const s=r||this.getIdToRemoteIdMap(e),i=n||this.getRemoteIdToIdMap(e);let o=s.get(t);return o||(o=this.generateIdFn(),s.set(t,o),i.set(o,t)),o}getIds(e,t){const r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,n))}getRemoteId(e,t,r){const n=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const s=n.get(t);return s||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class bh{constructor(e){f(this,"iframes",new WeakMap),f(this,"crossOriginIframeMap",new WeakMap),f(this,"crossOriginIframeMirror",new wh(re)),f(this,"crossOriginIframeStyleMirror"),f(this,"crossOriginIframeRootIdMap",new WeakMap),f(this,"mirror"),f(this,"mutationCb"),f(this,"wrappedEmit"),f(this,"loadListener"),f(this,"stylesheetManager"),f(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new wh(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(n=this.loadListener)||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const r=this.crossOriginIframeMap.get(e.source);if(!r)return;const n=this.transformCrossOriginEvent(r,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case Wc.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:Wc.IncrementalSnapshot,data:{source:Vc.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Wc.Meta:case Wc.Load:case Wc.DomContentLoaded:return!1;case Wc.Plugin:return t;case Wc.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Wc.IncrementalSnapshot:switch(t.data.source){case Vc.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Vc.Drag:case Vc.TouchMove:case Vc.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Vc.ViewportResize:return!1;case Vc.MediaInteraction:case Vc.MouseInteraction:case Vc.Scroll:case Vc.CanvasMutation:case Vc.Input:return this.replaceIds(t.data,e,["id"]),t;case Vc.StyleSheetRule:case Vc.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Vc.Font:return t;case Vc.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case Vc.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,r,n){for(const s of n)(Array.isArray(t[s])||"number"==typeof t[s])&&(Array.isArray(t[s])?t[s]=e.getIds(r,t[s]):t[s]=e.getId(r,t[s]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===Jc.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class vh{constructor(e){f(this,"shadowDoms",new WeakSet),f(this,"mutationCb"),f(this,"scrollCb"),f(this,"bypassOptions"),f(this,"mirror"),f(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!U(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=ah(p(d({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(ch(p(d({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(hc.host(e))),this.restoreHandlers.push(fh({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(cc(e.prototype,"attachShadow",(function(e){return function(n){const s=e.call(this,n);Sh["[native"]=0;const i=hc.shadowRoot(this);return i&&zc(this)&&r.addShadowRoot(i,t),s}})))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}const Sh={};for(var _h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ch="undefined"==typeof Uint8Array?[]:new Uint8Array(256),kh=0;kh<_h.length;kh++)Ch[_h.charCodeAt(kh)]=kh;const xh=new Map;const Eh=(e,t,r)=>{if(!e||!Mh(e,t)&&"object"!=typeof e)return;const n=function(e,t){let r=xh.get(e);return r||(r=new Map,xh.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name);let s=n.indexOf(e);return-1===s&&(s=n.length,n.push(e)),s};function Ih(e,t,r){if(e instanceof Array)return e.map(e=>Ih(e,t,r));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:function(e){var t,r=new Uint8Array(e),n=r.length,s="";for(t=0;t>2],s+=_h[(3&r[t])<<4|r[t+1]>>4],s+=_h[(15&r[t+1])<<2|r[t+2]>>6],s+=_h[63&r[t+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Ih(e.buffer,t,r),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:r}=e;return{rr_type:t,src:r}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Ih(e.data,t,r),e.width,e.height]}}if(Mh(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Eh(e,t,r)}}return e}const Ah=(e,t,r)=>e.map(e=>Ih(e,t,r)),Mh=(e,t)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(r.find(r=>e instanceof t[r]))};function Th(e,t,r,n){const s=[];try{const i=cc(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(s,...i){if(!Sc(this,t,r,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(s);if("__context"in this||(this.__context=e),n&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){const e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[s,...i])}}));s.push(i)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(e=>e())}}function Rh(e,t,r,n,s,i){const o=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=cc(e,l,(function(e){return function(...o){const a=e.apply(this,o);if(Eh(a,i,this),"tagName"in this.canvas&&!Sc(this.canvas,n,s,!0)){const e=Ah(o,i,this),n={type:t,property:l,args:e};r(this.canvas,n)}return a}}));o.push(a)}catch(n){const s=mc(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});o.push(s)}return o}const Oh="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Nh="undefined"!=typeof self&&self.Blob&&new Blob([(Dh=Oh,Uint8Array.from(atob(Dh),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var Dh;function Lh(e){let t;try{if(t=Nh&&(self.URL||self.webkitURL).createObjectURL(Nh),!t)throw"";const r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(t){return new Worker("data:text/javascript;base64,"+Oh,{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Ph{constructor(e){f(this,"pendingCanvasMutations",new Map),f(this,"rafStamps",{latestId:0,invokeId:null}),f(this,"mirror"),f(this,"mutationCb"),f(this,"resetObservers"),f(this,"frozen",!1),f(this,"locked",!1),f(this,"processMutation",(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});const{sampling:t="all",win:r,blockClass:n,blockSelector:s,recordCanvas:i,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(r,n,s),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,n,s,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,n,s){const i=Th(t,r,n,!0),o=new Map,a=new Lh;a.onmessage=e=>{const{id:t}=e.data;if(o.set(t,!1),!("base64"in e.data))return;const{base64:r,type:n,width:s,height:i}=e.data;this.mutationCb({id:t,type:Gc["2D"],commands:[{property:"clearRect",args:[0,0,s,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:n}]},0,0]}]})};const l=1e3/e;let c,h=0;const u=e=>{h&&e-h{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{Sc(t,r,n,!0)||e.push(t)}),e})().forEach(async e=>{var t;const r=this.mirror.getId(e);if(o.get(r))return;if(0===e.width||0===e.height)return;if(o.set(r,!0),["webgl","webgl2"].includes(e.__context)){const r=e.getContext(e.__context);!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)}const n=await createImageBitmap(e);a.postMessage({id:r,bitmap:n,width:e.width,height:e.height,dataURLOptions:s.dataURLOptions},[n])})),c=requestAnimationFrame(u)};c=requestAnimationFrame(u),this.resetObservers=()=>{i(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const n=Th(e,t,r,!1),s=function(e,t,r,n){const s=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])continue;const i=cc(t.CanvasRenderingContext2D.prototype,o,(function(s){return function(...i){return Sc(this.canvas,r,n,!0)||setTimeout(()=>{const r=Ah(i,t,this);e(this.canvas,{type:Gc["2D"],property:o,args:r})},0),s.apply(this,i)}}));s.push(i)}catch(r){const n=mc(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:Gc["2D"],property:o,args:[t],setter:!0})}});s.push(n)}return()=>{s.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),i=function(e,t,r,n){const s=[];return s.push(...Rh(t.WebGLRenderingContext.prototype,Gc.WebGL,e,r,n,t)),void 0!==t.WebGL2RenderingContext&&s.push(...Rh(t.WebGL2RenderingContext.prototype,Gc.WebGL2,e,r,n,t)),()=>{s.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{n(),s(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;const n=r.map(e=>{const t=e,{type:r}=t;return((e,t)=>{var r={};for(var n in e)c.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&l)for(var n of l(e))t.indexOf(n)<0&&h.call(e,n)&&(r[n]=e[n]);return r})(t,["type"])}),{type:s}=r[0];this.mutationCb({id:t,type:s,commands:n}),this.pendingCanvasMutations.delete(e)}}class Fh{constructor(e){f(this,"trackedLinkElements",new WeakSet),f(this,"mutationCb"),f(this,"adoptedStyleSheetCb"),f(this,"styleMirror",new Pc),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const r={id:t,styleIds:[]},n=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,r)=>({rule:z(e,t.href),index:r}))})),r.styleIds.push(e)}n.length>0&&(r.styles=n),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Uh{constructor(){f(this,"nodeMap",new WeakMap),f(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}remove(e,t){const r=this.nodeMap.get(e);r&&r.delete(t)}destroy(){}}let Bh,zh,jh,Wh=!1;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(s=e.contentWindow)?void 0:s.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Vh=W();function Yh(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:i=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:h=!0,maskAllInputs:u,maskInputOptions:p,slimDOMOptions:f,maskInputFn:m,maskTextFn:g,hooks:y,packFn:w,sampling:b={},dataURLOptions:v={},mousemoveWait:S,recordDOM:_=!0,recordCanvas:C=!1,recordCrossOriginIframes:k=!1,recordAfter:x=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:E=!1,collectFonts:I=!1,inlineImages:A=!1,plugins:M,keepIframeSrcFn:T=(()=>!1),ignoreCSSAttributes:R=new Set([]),errorHandler:O}=e;nh=O;const N=!k||window.parent===window;let D=!1;if(!N)try{window.parent.document&&(D=!1)}catch(e){D=!0}if(N&&!t)throw new Error("emit function is required");if(!N&&!D)return()=>{};void 0!==S&&void 0===b.mousemove&&(b.mousemove=S),Vh.reset();const L=!0===u?{button:!0,checkbox:!0,color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,file:!0,image:!0,month:!0,number:!0,password:!0,radio:!0,range:!0,reset:!0,search:!0,submit:!0,select:!0,tel:!0,text:!0,textarea:!0,time:!0,url:!0,week:!0}:void 0!==p?p:{password:!0},P=!0===f||"all"===f?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===f,headMetaDescKeywords:"all"===f,headTitleMutations:"all"===f}:f||{};let F;Ec();let U=0;const B=e=>{for(const t of M||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!D&&(e=w(e)),e};Bh=(e,s)=>{var i;const o=e;if(o.timestamp=gc(),!(null==(i=ih[0])?void 0:i.isFrozen())||o.type===Wc.FullSnapshot||o.type===Wc.IncrementalSnapshot&&o.data.source===Vc.Mutation||ih.forEach(e=>e.unfreeze()),N)null==t||t(B(o),s);else if(D){const e={type:"rrweb",event:B(o),origin:window.location.origin,isCheckout:s};window.parent.postMessage(e,"*")}if(o.type===Wc.FullSnapshot)F=o,U=0;else if(o.type===Wc.IncrementalSnapshot){if(o.data.source===Vc.Mutation&&o.data.isAttachIframe)return;U++;const e=n&&U>=n,t=r&&o.timestamp-F.timestamp>r;(e||t)&&zh(!0)}};const z=e=>{Bh({type:Wc.IncrementalSnapshot,data:d({source:Vc.Mutation},e)})},W=e=>Bh({type:Wc.IncrementalSnapshot,data:d({source:Vc.Scroll},e)}),V=e=>Bh({type:Wc.IncrementalSnapshot,data:d({source:Vc.CanvasMutation},e)}),Y=new Fh({mutationCb:z,adoptedStyleSheetCb:e=>Bh({type:Wc.IncrementalSnapshot,data:d({source:Vc.AdoptedStyleSheet},e)})}),Z=new bh({mirror:Vh,mutationCb:z,stylesheetManager:Y,recordCrossOriginIframes:k,wrappedEmit:Bh});for(const e of M||[])e.getMirror&&e.getMirror({nodeMirror:Vh,crossOriginIframeMirror:Z.crossOriginIframeMirror,crossOriginIframeStyleMirror:Z.crossOriginIframeStyleMirror});const G=new Uh;jh=new Ph({recordCanvas:C,mutationCb:V,win:window,blockClass:s,blockSelector:i,mirror:Vh,sampling:b.canvas,dataURLOptions:v});const H=new vh({mutationCb:z,scrollCb:W,bypassOptions:{blockClass:s,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskInputOptions:L,dataURLOptions:v,maskTextFn:g,maskInputFn:m,recordCanvas:C,inlineImages:A,sampling:b,slimDOMOptions:P,iframeManager:Z,stylesheetManager:Y,canvasManager:jh,keepIframeSrcFn:T,processedNodeManager:G},mirror:Vh});zh=(e=!1)=>{if(!_)return;Bh({type:Wc.Meta,data:{href:window.location.href,width:bc(),height:wc()}},e),Y.reset(),H.init(),ih.forEach(e=>e.lock());const t=function(e,t){const{mirror:r=new j,blockClass:n="rr-block",blockSelector:s=null,maskTextClass:i="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:u,maskInputFn:d,slimDOM:p=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S=(()=>!1)}=t||{};return ye(e,{doc:e,mirror:r,blockClass:n,blockSelector:s,maskTextClass:i,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===h?{button:!0,checkbox:!0,color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,file:!0,image:!0,month:!0,number:!0,password:!0,radio:!0,range:!0,reset:!0,search:!0,submit:!0,select:!0,tel:!0,text:!0,textarea:!0,time:!0,url:!0,week:!0}:!1===h?{password:!0}:h,maskTextFn:u,maskInputFn:d,slimDOMOptions:!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===p,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===p?{}:p,dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:Vh,blockClass:s,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskAllInputs:L,maskTextFn:g,maskInputFn:m,slimDOM:P,dataURLOptions:v,recordCanvas:C,inlineImages:A,onSerialize:e=>{Mc(e,Vh)&&Z.addIframe(e),Tc(e,Vh)&&Y.trackLinkElement(e),Oc(e)&&H.addShadowRoot(hc.shadowRoot(e),document)},onIframeLoad:(e,t)=>{Z.attachIframe(e,t),H.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Y.attachLinkElement(e,t)},keepIframeSrcFn:T});if(!t)return console.warn("Failed to snapshot the document");Bh({type:Wc.FullSnapshot,data:{node:t,initialOffset:yc(window)}},e),ih.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,Vh.getId(document))};try{const e=[],t=e=>{var t;return sh(mh)({mutationCb:z,mousemoveCb:(e,t)=>Bh({type:Wc.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Bh({type:Wc.IncrementalSnapshot,data:d({source:Vc.MouseInteraction},e)}),scrollCb:W,viewportResizeCb:e=>Bh({type:Wc.IncrementalSnapshot,data:d({source:Vc.ViewportResize},e)}),inputCb:e=>Bh({type:Wc.IncrementalSnapshot,data:d({source:Vc.Input},e)}),mediaInteractionCb:e=>Bh({type:Wc.IncrementalSnapshot,data:d({source:Vc.MediaInteraction},e)}),styleSheetRuleCb:e=>Bh({type:Wc.IncrementalSnapshot,data:d({source:Vc.StyleSheetRule},e)}),styleDeclarationCb:e=>Bh({type:Wc.IncrementalSnapshot,data:d({source:Vc.StyleDeclaration},e)}),canvasMutationCb:V,fontCb:e=>Bh({type:Wc.IncrementalSnapshot,data:d({source:Vc.Font},e)}),selectionCb:e=>{Bh({type:Wc.IncrementalSnapshot,data:d({source:Vc.Selection},e)})},customElementCb:e=>{Bh({type:Wc.IncrementalSnapshot,data:d({source:Vc.CustomElement},e)})},blockClass:s,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:L,inlineStylesheet:h,sampling:b,recordDOM:_,recordCanvas:C,inlineImages:A,userTriggeredOnInput:E,collectFonts:I,doc:e,maskInputFn:m,maskTextFn:g,keepIframeSrcFn:T,blockSelector:i,slimDOMOptions:P,dataURLOptions:v,mirror:Vh,iframeManager:Z,stylesheetManager:Y,shadowDomManager:H,processedNodeManager:G,canvasManager:jh,ignoreCSSAttributes:R,plugins:(null==(t=null==M?void 0:M.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>Bh({type:Wc.Plugin,data:{plugin:e.name,payload:t}})})))||[]},y)};Z.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}});const r=()=>{zh(),e.push(t(document)),Wh=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(uc("DOMContentLoaded",()=>{Bh({type:Wc.DomContentLoaded,data:{}}),"DOMContentLoaded"===x&&r()})),e.push(uc("load",()=>{Bh({type:Wc.Load,data:{}}),"load"===x&&r()},window))),()=>{e.forEach(e=>{try{e()}catch(e){String(e).toLowerCase().includes("cross-origin")||console.warn(e)}}),G.destroy(),Wh=!1,nh=void 0}}catch(e){console.warn(e)}}function Zh(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map((function(e){e(r)})),(n=e.get("*"))&&n.slice().map((function(e){e(t,r)}))}}}Yh.addCustomEvent=(e,t)=>{if(!Wh)throw new Error("please add custom event after start recording");Bh({type:Wc.Custom,data:{tag:e,payload:t}})},Yh.freezePage=()=>{ih.forEach(e=>e.freeze())},Yh.takeFullSnapshot=e=>{if(!Wh)throw new Error("please take full snapshot after start recording");zh(e)},Yh.mirror=Vh;const Gh=Object.freeze(Object.defineProperty({__proto__:null,default:Zh},Symbol.toStringTag,{value:"Module"}));function Hh(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)return;const r=e.HTMLElement||e.Element,n={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||a,scrollIntoView:r.prototype.scrollIntoView},s=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;const i=(o=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(o)?1:0);var o;function a(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+i1?1:o,a=o,r=.5*(1-Math.cos(Math.PI*a)),n=t.startX+(t.x-t.startX)*r,i=t.startY+(t.y-t.startY)*r,t.method.call(t.scrollable,n,i),n===t.x&&i===t.y||e.requestAnimationFrame(p.bind(e,t))}function f(r,i,o){let l,c,h,u;const d=s();r===t.body?(l=e,c=e.scrollX||e.pageXOffset,h=e.scrollY||e.pageYOffset,u=n.scroll):(l=r,c=r.scrollLeft,h=r.scrollTop,u=a),p({scrollable:l,method:u,startTime:d,startX:c,startY:h,x:i,y:o})}e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?f.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):n.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?n.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):f.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0===arguments[0])return;if(!0===l(arguments[0])){if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");return void n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}const e=arguments[0].left,t=arguments[0].top;f.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0===l(arguments[0]))return void n.scrollIntoView.call(this,void 0===arguments[0]||arguments[0]);const r=d(this),s=r.getBoundingClientRect(),i=this.getBoundingClientRect();r!==t.body?(f.call(this,r,r.scrollLeft+i.left-s.left,r.scrollTop+i.top-s.top),"fixed"!==e.getComputedStyle(r).position&&e.scrollBy({left:s.left,top:s.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}}class Xh{constructor(e=[],t){f(this,"timeOffset",0),f(this,"speed"),f(this,"actions"),f(this,"raf",null),f(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){const t=!0===this.raf;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const t=this.findActionIndex(e);this.actions.splice(t,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const e=this.actions[0];if(!(this.timeOffset>=e.delay))break;this.actions.shift(),e.doAction()}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return null!==this.raf}findActionIndex(e){let t=0,r=this.actions.length-1;for(;t<=r;){const n=Math.floor((t+r)/2);if(this.actions[n].delaye.delay))return n+1;r=n-1}}return t}}function Jh(e,t){if(e.type===Wc.IncrementalSnapshot&&e.data.source===Vc.MouseMove&&e.data.positions&&e.data.positions.length){const r=e.data.positions[0].timeOffset,n=e.timestamp+r;return e.delay=n-t,n-t}return e.delay=e.timestamp-t,e.delay} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function Kh(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,s,i=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){s={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return o}var $h,Qh;(Qh=$h||($h={}))[Qh.NotStarted=0]="NotStarted",Qh[Qh.Running=1]="Running",Qh[Qh.Stopped=2]="Stopped";var qh={type:"xstate.init"};function eu(e){return void 0===e?[]:[].concat(e)}function tu(e){return{type:"xstate.assign",assignment:e}}function ru(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function nu(e){return function(t){return e===t}}function su(e){return"string"==typeof e?{type:e}:e}function iu(e,t){return{value:e,context:t,actions:[],changed:!1,matches:nu(e)}}function ou(e,t,r){var n=t,s=!1;return[e.filter((function(e){if("xstate.assign"===e.type){s=!0;var t=Object.assign({},n);return"function"==typeof e.assignment?t=e.assignment(n,r):Object.keys(e.assignment).forEach((function(s){t[s]="function"==typeof e.assignment[s]?e.assignment[s](n,r):e.assignment[s]})),n=t,!1}return!0})),n,s]}function au(e,t){void 0===t&&(t={});var r=Kh(ou(eu(e.states[e.initial].entry).map((function(e){return ru(e,t.actions)})),e.context,qh),2),n=r[0],s=r[1],i={config:e,_options:t,initialState:{value:e.initial,actions:n,context:s,matches:nu(e.initial)},transition:function(t,r){var n,s,o="string"==typeof t?{value:t,context:e.context}:t,a=o.value,l=o.context,c=su(r),h=e.states[a];if(h.on){var u=eu(h.on[c.type]);try{for(var d=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(u),p=d.next();!p.done;p=d.next()){var f=p.value;if(void 0===f)return iu(a,l);var m="string"==typeof f?{target:f}:f,g=m.target,y=m.actions,w=void 0===y?[]:y,b=m.cond,v=void 0===b?function(){return!0}:b,S=void 0===g,_=null!=g?g:a,C=e.states[_];if(v(l,c)){var k=Kh(ou((S?eu(w):[].concat(h.exit,w,C.entry).filter((function(e){return e}))).map((function(e){return ru(e,i._options.actions)})),l,c),3),x=k[0],E=k[1],I=k[2],A=null!=g?g:a;return{value:A,context:E,actions:x,changed:g!==a||x.length>0||I,matches:nu(A)}}}}catch(e){n={error:e}}finally{try{p&&!p.done&&(s=d.return)&&s.call(d)}finally{if(n)throw n.error}}}return iu(a,l)}};return i}var lu=function(e,t){return e.actions.forEach((function(r){var n=r.exec;return n&&n(e.context,t)}))};function cu(e){var t=e.initialState,r=$h.NotStarted,n=new Set,s={_machine:e,send:function(s){r===$h.Running&&(t=e.transition(t,s),lu(t,su(s)),n.forEach((function(e){return e(t)})))},subscribe:function(e){return n.add(e),e(t),{unsubscribe:function(){return n.delete(e)}}},start:function(n){if(n){var i="object"==typeof n?n:{context:e.config.context,value:n};t={value:i.value,actions:[],context:i.context,matches:nu(i.value)}}return r=$h.Running,lu(t,qh),s},stop:function(){return r=$h.Stopped,n.clear(),s},get state(){return t},get status(){return r}};return s}function hu(e,{getCastFn:t,applyEventsSynchronously:r,emitter:n}){return cu(au({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:tu({lastPlayedEvent:(e,t)=>"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}),recordTimeOffset:tu((e,t)=>{let r=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(r=t.payload.timeOffset),p(d({},e),{timeOffset:r,baselineTime:e.events[0].timestamp+r})}),play(e){var s;const{timer:i,events:o,baselineTime:a,lastPlayedEvent:l}=e;i.clear();for(const e of o)Jh(e,a);const c=function(e,t){for(let r=e.length-1;r>=0;r--){const n=e[r];if(n.type===Wc.Meta&&n.timestamp<=t)return e.slice(r)}return e}(o,a);let h=null==l?void 0:l.timestamp;(null==l?void 0:l.type)===Wc.IncrementalSnapshot&&l.data.source===Vc.MouseMove&&(h=l.timestamp+(null==(s=l.data.positions[0])?void 0:s.timeOffset)),a<(h||0)&&n.emit(Xc.PlayBack);const u=new Array;for(const e of c)if(!(h&&h{r()},delay:e.delay})}r(u),n.emit(Xc.Flush),i.start()},pause(e){e.timer.clear()},resetLastPlayedEvent:tu(e=>p(d({},e),{lastPlayedEvent:null})),startLive:tu({baselineTime:(e,t)=>(e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now())}),addEvent:tu((e,r)=>{const{baselineTime:n,timer:s,events:i}=e;if("ADD_EVENT"===r.type){const{event:e}=r.payload;Jh(e,n);let o=i.length-1;if(!i[o]||i[o].timestamp<=e.timestamp)i.push(e);else{let t=-1,r=0;for(;r<=o;){const t=Math.floor((r+o)/2);i[t].timestamp<=e.timestamp?r=t+1:o=t-1}-1===t&&(t=r),i.splice(t,0,e)}const a=e.timestamp{l()},delay:e.delay})}return p(d({},e),{events:i})})}}))}const uu=new Map;function du(e,t){let r=uu.get(e);return r||(r=new Map,uu.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function pu(e,t,r){return async n=>{if(n&&"object"==typeof n&&"rr_type"in n){if(r&&(r.isUnchanged=!1),"ImageBitmap"===n.rr_type&&"args"in n){const s=await pu(e,t,r)(n.args);return await createImageBitmap.apply(null,s)}if("index"in n){if(r||null===t)return n;const{rr_type:e,index:s}=n;return du(t,e)[s]}if("args"in n){const{rr_type:s,args:i}=n;return new(0,window[s])(...await Promise.all(i.map(pu(e,t,r))))}if("base64"in n)return function(e){var t,r,n,s,i,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var c=new ArrayBuffer(o),h=new Uint8Array(c);for(t=0;t>4,h[l++]=(15&n)<<4|s>>2,h[l++]=(3&s)<<6|63&i;return c}(n.base64);if("src"in n){const t=e.get(n.src);if(t)return t;{const t=new Image;return t.src=n.src,e.set(n.src,t),t}}if("data"in n&&"Blob"===n.rr_type){const s=await Promise.all(n.data.map(pu(e,t,r)));return new Blob(s,{type:n.type})}}else if(Array.isArray(n)){return await Promise.all(n.map(pu(e,t,r)))}return n}}const fu=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];async function mu({mutation:e,target:t,type:r,imageMap:n,errorHandler:s}){try{const s=function(e,t){try{return t===Gc.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(e){return null}}(t,r);if(!s)return;if(e.setter)return void(s[e.property]=e.args[0]);const i=s[e.property],o=await Promise.all(e.args.map(pu(n,s)));!function(e,t){if(!(null==t?void 0:t.constructor))return;const{name:r}=t.constructor;if(!fu.includes(r))return;const n=du(e,r);n.includes(t)||n.push(t)}(s,i.apply(s,o))}catch(t){s(e,t)}}async function gu({event:e,mutation:t,target:r,imageMap:n,canvasEventMap:s,errorHandler:i}){try{const o=s.get(e)||t,a="commands"in o?o.commands:[o];if([Gc.WebGL,Gc.WebGL2].includes(t.type)){for(let e=0;ePromise.all(e.args.map(pu(n,i))));(await Promise.all(o)).forEach((r,o)=>{const a=t[o];try{if(a.setter)return void(i[a.property]=a.args[0]);const t=i[a.property];"drawImage"===a.property&&"string"==typeof a.args[0]?(n.get(e),t.apply(i,a.args)):t.apply(i,r)}catch(e){s(a,e)}})}({event:e,mutations:a,target:r,imageMap:n,errorHandler:i})}catch(e){i(t,e)}}class yu{constructor(e){f(this,"mediaMap",new Map),f(this,"warn"),f(this,"service"),f(this,"speedService"),f(this,"emitter"),f(this,"getCurrentTime"),f(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(Xc.Start,this.start.bind(this)),this.emitter.on(Xc.SkipStart,this.start.bind(this)),this.emitter.on(Xc.Pause,this.pause.bind(this)),this.emitter.on(Xc.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){const n=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,s="duration"in t&&t.duration;if(Number.isNaN(s))return void this.waitForMetadata(t);let i=r.currentTimeAtLastInteraction+n;t.loop&&!1!==s&&(i%=s),t.currentTime=i}else t.pause(),t.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e))return;if(!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const t=this.mediaMap.get(e);t&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){var n,s,i,o,a;const l=this.mediaMap.get(e),{type:c,playbackRate:h,currentTime:u,muted:d,volume:p,loop:f}=r;return{isPlaying:c===Hc.Play||c!==Hc.Pause&&((null==l?void 0:l.isPlaying)||null!==e.getAttribute("autoplay")),currentTimeAtLastInteraction:null!=(n=null!=u?u:null==l?void 0:l.currentTimeAtLastInteraction)?n:0,lastInteractionTimeOffset:t,playbackRate:null!=(s=null!=h?h:null==l?void 0:l.playbackRate)?s:1,volume:null!=(i=null!=p?p:null==l?void 0:l.volume)?i:1,muted:null!=(o=null!=d?d:null==l?void 0:l.muted)?o:null===e.getAttribute("muted"),loop:null!=(a=null!=f?f:null==l?void 0:l.loop)?a:null===e.getAttribute("loop")}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:r,loop:n,volume:s,isPlaying:i}=t,o=this.service.state.matches("paused"),a=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==s&&(e.volume=s),e.muted=r,e.loop=n,e.playbackRate!==a&&(e.playbackRate=a),i&&!o?e.play():e.pause()}catch(e){this.warn("Failed to replay media interactions: "+(e.message||e))}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const n=e,s=r.getMeta(n);if(!s||!("attributes"in s))return;const i=this.service.state.matches("paused"),o=s.attributes;let a=!1;a=o.rr_mediaState?"played"===o.rr_mediaState:null!==n.getAttribute("autoplay"),a&&i&&n.pause();let l=1;"number"==typeof o.rr_mediaPlaybackRate&&(l=o.rr_mediaPlaybackRate);let c=!1;c="boolean"==typeof o.rr_mediaMuted?o.rr_mediaMuted:null!==n.getAttribute("muted");let h=!1;h="boolean"==typeof o.rr_mediaLoop?o.rr_mediaLoop:null!==n.getAttribute("loop");let u=1;"number"==typeof o.rr_mediaVolume&&(u=o.rr_mediaVolume);let d=0;"number"==typeof o.rr_mediaCurrentTime&&(d=o.rr_mediaCurrentTime),this.mediaMap.set(n,{isPlaying:a,currentTimeAtLastInteraction:d,lastInteractionTimeOffset:t,playbackRate:l,volume:u,muted:c,loop:h}),this.syncTargetWithState(n)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function wu(e,t){if("DIALOG"!==e.nodeName||e instanceof wl)return;const r=e,n=r.open,s=n&&r.matches("dialog:modal"),i=r.getAttribute("rr_open_mode"),o="string"==typeof(null==t?void 0:t.attributes.open)||"string"==typeof r.getAttribute("open"),a="modal"===i;n&&!(s&&"non-modal"===i||!s&&a)||(r.isConnected?(n&&r.close(),o&&(a?r.showModal():r.show())):console.warn("dialog is not attached to the dom",r))}function bu(e,t){if("DIALOG"!==e.nodeName||e instanceof wl)return;const r=e;r.isConnected?null===t.attributes.open&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode")):console.warn("dialog is not attached to the dom",r)}const vu=Zh||Gh,Su={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function _u(e){return e.type==Wc.IncrementalSnapshot&&(e.data.source==Vc.TouchMove||e.data.source==Vc.MouseInteraction&&e.data.type==Yc.TouchStart)}class Cu{constructor(e,t){if(f(this,"wrapper"),f(this,"iframe"),f(this,"service"),f(this,"speedService"),f(this,"config"),f(this,"usingVirtualDom",!1),f(this,"virtualDom",new zl),f(this,"mouse"),f(this,"mouseTail",null),f(this,"tailPositions",[]),f(this,"emitter",vu()),f(this,"nextUserInteractionEvent"),f(this,"legacy_missingNodeRetryMap",{}),f(this,"cache",is()),f(this,"imageMap",new Map),f(this,"canvasEventMap",new Map),f(this,"mirror",W()),f(this,"styleMirror",new Pc),f(this,"mediaManager"),f(this,"firstFullSnapshot",null),f(this,"newDocumentQueue",[]),f(this,"mousePos",null),f(this,"touchActive",null),f(this,"lastMouseDownEvent",null),f(this,"lastHoveredRootNode"),f(this,"lastSelectionData",null),f(this,"constructedStyleMutations",[]),f(this,"adoptedStyleSheets",[]),f(this,"handleResize",e=>{this.iframe.style.display="inherit";for(const t of[this.mouseTail,this.iframe])t&&(t.setAttribute("width",String(e.width)),t.setAttribute("height",String(e.height)))}),f(this,"applyEventsSynchronously",e=>{for(const t of e){switch(t.type){case Wc.DomContentLoaded:case Wc.Load:case Wc.Custom:continue;case Wc.FullSnapshot:case Wc.Meta:case Wc.Plugin:case Wc.IncrementalSnapshot:}this.getCastFn(t,!0)()}}),f(this,"getCastFn",(e,t=!1)=>{let r;switch(e.type){case Wc.DomContentLoaded:case Wc.Load:break;case Wc.Custom:r=()=>{this.emitter.emit(Xc.CustomEvent,e)};break;case Wc.Meta:r=()=>this.emitter.emit(Xc.Resize,{width:e.data.width,height:e.data.height});break;case Wc.FullSnapshot:r=()=>{var r;if(this.firstFullSnapshot){if(this.firstFullSnapshot===e)return void(this.firstFullSnapshot=!0)}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(e,t),null==(r=this.iframe.contentWindow)||r.scrollTo(e.data.initialOffset)};break;case Wc.IncrementalSnapshot:r=()=>{if(this.applyIncremental(e,t),e===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),!t&&this.config.skipInactive&&!this.nextUserInteractionEvent){for(const t of this.service.state.context.events)if(!(t.timestamp<=e.timestamp)&&this.isUserInteraction(t)){t.delay-e.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=t);break}if(this.nextUserInteractionEvent){const t=this.nextUserInteractionEvent.delay-e.delay,r={speed:Math.min(Math.round(t/5e3),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:r}),this.emitter.emit(Xc.SkipStart,r)}}}}return()=>{r&&r();for(const r of this.config.plugins||[])r.handler&&r.handler(e,t,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:e}});const n=this.service.state.context.events.length-1;if(!this.config.liveMode&&e===this.service.state.context.events[n]){const t=()=>{n{if(this.usingVirtualDom){const e={mirror:this.mirror,applyCanvas:(e,t,r)=>{gu({event:e,mutation:t,target:r,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(e,t)=>{e.source===Vc.StyleSheetRule?this.applyStyleSheetRule(e,t):e.source===Vc.StyleDeclaration&&this.applyStyleDeclaration(e,t)},afterAppend:(e,t)=>{for(const r of this.config.plugins||[])r.onBuild&&r.onBuild(e,{id:t,replayer:this})}};if(this.iframe.contentDocument)try{Ll(this.iframe.contentDocument,this.virtualDom,e,this.virtualDom.mirror)}catch(e){console.warn(e)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const t in this.legacy_missingNodeRetryMap)try{const r=this.legacy_missingNodeRetryMap[t],n=Fl(r.node,this.mirror,this.virtualDom.mirror);Ll(n,r.node,e,this.virtualDom.mirror),r.node=n}catch(e){this.warn(e)}this.constructedStyleMutations.forEach(e=>{this.applyStyleSheetMutation(e)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(e=>{this.applyAdoptedStyleSheet(e)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[e,t]=this.lastMouseDownEvent;e.dispatchEvent(t)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(Xc.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const n=new Xh([],{speed:this.config.speed});this.service=hu({events:e.map(e=>t&&t.unpackFn?t.unpackFn(e):e).sort((e,t)=>e.timestamp-t.timestamp),timer:n,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(e=>{this.emitter.emit(Xc.StateChange,{player:e})}),this.speedService=cu(au({id:"speed",context:{normalSpeed:-1,timer:n},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(e,t)=>{"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:tu({normalSpeed:e=>e.timer.speed}),restoreSpeed:e=>{e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe(e=>{this.emitter.emit(Xc.StateChange,{speed:e})}),this.mediaManager=new yu({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const s=this.service.state.context.events.find(e=>e.type===Wc.Meta),i=this.service.state.context.events.find(e=>e.type===Wc.FullSnapshot);if(s){const{width:e,height:t}=s.data;setTimeout(()=>{this.emitter.emit(Xc.Resize,{width:e,height:t})},0)}i&&setTimeout(()=>{var e;this.firstFullSnapshot||(this.firstFullSnapshot=i,this.rebuildFullSnapshot(i),null==(e=this.iframe.contentWindow)||e.scrollTo(i.data.initialOffset))},1),this.service.state.context.events.find(_u)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),void 0!==e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),void 0!==e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,r;this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}}),null==(r=null==(t=this.iframe.contentDocument)?void 0:t.getElementsByTagName("html")[0])||r.classList.remove("rrweb-paused"),this.emitter.emit(Xc.Start)}pause(e){var t,r;void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),null==(r=null==(t=this.iframe.contentDocument)?void 0:t.getElementsByTagName("html")[0])||r.classList.add("rrweb-paused"),this.emitter.emit(Xc.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(Xc.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Xc.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;_u(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=is()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Hh(this.iframe.contentWindow,this.iframe.contentDocument),Ec(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const r=[],n=new Set,s=(t,s)=>{if("DIALOG"===t.nodeName&&n.add(t),this.collectIframeAndAttachDocument(r,t),this.mediaManager.isSupportedMediaElement(t)){const{events:r}=this.service.state.context;this.mediaManager.addMediaElements(t,e.timestamp-r[0].timestamp,this.mirror)}for(const e of this.config.plugins||[])e.onBuild&&e.onBuild(t,{id:s,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),cs(e.data.node,{doc:this.iframe.contentDocument,afterAppend:s,cache:this.cache,mirror:this.mirror}),s(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:e,builtNode:t}of r)this.attachDocumentToIframe(e,t),this.newDocumentQueue=this.newDocumentQueue.filter(t=>t!==e);const{documentElement:i,head:o}=this.iframe.contentDocument;this.insertStyleRules(i,o),n.forEach(e=>wu(e)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Xc.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const n=(s=this.config.blockClass,[`.${s} { background: currentColor }`,"noscript { display: none !important; }"]).concat(this.config.insertStyleRules);var s;if(this.config.pauseAnimation&&n.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),n.length)if(this.usingVirtualDom){const r=this.virtualDom.createElement("style");this.virtualDom.mirror.add(r,ql(r,this.virtualDom.unserializedId)),e.insertBefore(r,t),r.rules.push({source:Vc.StyleSheetRule,adds:n.map((e,t)=>({rule:e,index:t}))})}else{const s=document.createElement("style");e.insertBefore(s,t);for(let e=0;e{"DIALOG"===e.nodeName&&s.add(e),this.collectIframeAndAttachDocument(n,e);const o=r.getMeta(e);if((null==o?void 0:o.type)===Jc.Element&&"HTML"===(null==o?void 0:o.tagName.toUpperCase())){const{documentElement:e,head:r}=t.contentDocument;this.insertStyleRules(e,r)}if(!this.usingVirtualDom)for(const t of this.config.plugins||[])t.onBuild&&t.onBuild(e,{id:i,replayer:this})};ls(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:i,cache:this.cache}),i(t.contentDocument,e.node.id);for(const{mutationInQueue:e,builtNode:t}of n)this.attachDocumentToIframe(e,t),this.newDocumentQueue=this.newDocumentQueue.filter(t=>t!==e);s.forEach(e=>wu(e))}collectIframeAndAttachDocument(e,t){if(Mc(t,this.mirror)){const r=this.newDocumentQueue.find(e=>e.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;const t=null==(e=this.iframe.contentDocument)?void 0:e.head;if(t){const e=new Set;let r,n=this.service.state;const s=()=>{n=this.service.state};this.emitter.on(Xc.Start,s),this.emitter.on(Xc.Pause,s);const i=()=>{this.emitter.off(Xc.Start,s),this.emitter.off(Xc.Pause,s)};t.querySelectorAll('link[rel="stylesheet"]').forEach(t=>{t.sheet||(e.add(t),t.addEventListener("load",()=>{e.delete(t),0===e.size&&-1!==r&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(Xc.LoadStylesheetEnd),r&&clearTimeout(r),i())}))}),e.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Xc.LoadStylesheetStart),r=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),r=-1,i()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)if(t.type===Wc.IncrementalSnapshot&&t.data.source===Vc.CanvasMutation){e.push(this.deserializeAndPreloadCanvasEvents(t.data,t));("commands"in t.data?t.data.commands:[t.data]).forEach(e=>{this.preloadImages(e,t)})}return Promise.all(e)}preloadImages(e,t){if("drawImage"===e.property&&"string"==typeof e.args[0]&&!this.imageMap.has(t)){const e=document.createElement("canvas"),t=e.getContext("2d"),r=null==t?void 0:t.createImageData(e.width,e.height);null==t||t.putImageData(r,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const r={isUnchanged:!0};if("commands"in e){const n=await Promise.all(e.commands.map(async e=>{const t=await Promise.all(e.args.map(pu(this.imageMap,null,r)));return p(d({},e),{args:t})}));!1===r.isUnchanged&&this.canvasEventMap.set(t,p(d({},e),{commands:n}))}else{const n=await Promise.all(e.args.map(pu(this.imageMap,null,r)));!1===r.isUnchanged&&this.canvasEventMap.set(t,p(d({},e),{args:n}))}}}applyIncremental(e,t){var r,n,s;const{data:i}=e;switch(i.source){case Vc.Mutation:try{this.applyMutation(i,t)}catch(e){this.warn("Exception in mutation "+(e.message||e),i)}break;case Vc.Drag:case Vc.TouchMove:case Vc.MouseMove:if(t){const e=i.positions[i.positions.length-1];this.mousePos={x:e.x,y:e.y,id:e.id,debugData:i}}else i.positions.forEach(r=>{const n={doAction:()=>{this.moveAndHover(r.x,r.y,r.id,t,i)},delay:r.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(n)}),this.timer.addAction({doAction(){},delay:e.delay-(null==(r=i.positions[0])?void 0:r.timeOffset)});break;case Vc.MouseInteraction:{if(-1===i.id)break;const e=new Event(Y(Yc[i.type])),r=this.mirror.getNode(i.id);if(!r)return this.debugNodeNotFound(i,i.id);this.emitter.emit(Xc.MouseInteraction,{type:i.type,target:r});const{triggerFocus:n}=this.config;switch(i.type){case Yc.Blur:"blur"in r&&r.blur();break;case Yc.Focus:n&&r.focus&&r.focus({preventScroll:!0});break;case Yc.Click:case Yc.TouchStart:case Yc.TouchEnd:case Yc.MouseDown:case Yc.MouseUp:t?(i.type===Yc.TouchStart?this.touchActive=!0:i.type===Yc.TouchEnd&&(this.touchActive=!1),i.type===Yc.MouseDown?this.lastMouseDownEvent=[r,e]:i.type===Yc.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:i.x||0,y:i.y||0,id:i.id,debugData:i}):(i.type===Yc.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(i.x||0,i.y||0,i.id,t,i),i.type===Yc.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):i.type===Yc.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):i.type===Yc.TouchEnd?this.mouse.classList.remove("touch-active"):r.dispatchEvent(e));break;case Yc.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:r.dispatchEvent(e)}break}case Vc.Scroll:if(-1===i.id)break;if(this.usingVirtualDom){const e=this.virtualDom.mirror.getNode(i.id);if(!e)return this.debugNodeNotFound(i,i.id);e.scrollData=i;break}this.applyScroll(i,t);break;case Vc.ViewportResize:this.emitter.emit(Xc.Resize,{width:i.width,height:i.height});break;case Vc.Input:if(-1===i.id)break;if(this.usingVirtualDom){const e=this.virtualDom.mirror.getNode(i.id);if(!e)return this.debugNodeNotFound(i,i.id);e.inputData=i;break}this.applyInput(i);break;case Vc.MediaInteraction:{const t=this.usingVirtualDom?this.virtualDom.mirror.getNode(i.id):this.mirror.getNode(i.id);if(!t)return this.debugNodeNotFound(i,i.id);const r=t,{events:n}=this.service.state.context;this.mediaManager.mediaMutation({target:r,timeOffset:e.timestamp-n[0].timestamp,mutation:i});break}case Vc.StyleSheetRule:case Vc.StyleDeclaration:this.usingVirtualDom?i.styleId?this.constructedStyleMutations.push(i):i.id&&(null==(n=this.virtualDom.mirror.getNode(i.id))||n.rules.push(i)):this.applyStyleSheetMutation(i);break;case Vc.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const t=this.virtualDom.mirror.getNode(i.id);if(!t)return this.debugNodeNotFound(i,i.id);t.canvasMutations.push({event:e,mutation:i})}else{const t=this.mirror.getNode(i.id);if(!t)return this.debugNodeNotFound(i,i.id);gu({event:e,mutation:i,target:t,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case Vc.Font:try{const e=new FontFace(i.family,i.buffer?new Uint8Array(JSON.parse(i.fontSource)):i.fontSource,i.descriptors);null==(s=this.iframe.contentDocument)||s.fonts.add(e)}catch(e){this.warn(e)}break;case Vc.Selection:if(t){this.lastSelectionData=i;break}this.applySelection(i);break;case Vc.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(i):this.applyAdoptedStyleSheet(i)}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,function(e,t=As(),r=new zl){(function e(n,s){const i=$l(n,r,t,s);if(null!==i)if("IFRAME"!==(null==s?void 0:s.nodeName)&&n.nodeType!==Rl.DOCUMENT_FRAGMENT_NODE&&(null==s||s.appendChild(i),i.parentNode=s,i.parentElement=s),"IFRAME"===n.nodeName){const t=n.contentDocument;t&&e(t,i)}else n.nodeType!==Rl.DOCUMENT_NODE&&n.nodeType!==Rl.ELEMENT_NODE&&n.nodeType!==Rl.DOCUMENT_FRAGMENT_NODE||(n.nodeType===Rl.ELEMENT_NODE&&n.shadowRoot&&e(n.shadowRoot,i),n.childNodes.forEach(t=>e(t,i)))})(e,null)}(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const e in this.legacy_missingNodeRetryMap)try{const t=this.legacy_missingNodeRetryMap[e],r=$l(t.node,this.virtualDom,this.mirror);r&&(t.node=r)}catch(e){this.warn(e)}const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(t=>!!r.getNode(t.id)||(this.warnNodeNotFound(e,t.id),!1)),e.removes.forEach(t=>{var n;const s=r.getNode(t.id);if(!s)return;let i=r.getNode(t.parentId);if(!i)return this.warnNodeNotFound(e,t.parentId);if(t.isShadow&&Oc(i)&&(i=i.shadowRoot),r.removeNodeFromMap(s),i)try{i.removeChild(s),this.usingVirtualDom&&"#text"===s.nodeName&&"STYLE"===i.nodeName&&(null==(n=i.rules)?void 0:n.length)>0&&(i.rules=[])}catch(t){if(!(t instanceof DOMException))throw t;this.warn("parent could not remove child in mutation",i,s,e)}});const n=d({},this.legacy_missingNodeRetryMap),s=[],i=e=>{var t,i;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let o=r.getNode(e.parentId);if(!o)return e.node.type===Jc.Document?this.newDocumentQueue.push(e):s.push(e);e.node.isShadow&&(Oc(o)||o.attachShadow({mode:"open"}),o=o.shadowRoot);let a=null,l=null;if(e.previousId&&(a=r.getNode(e.previousId)),e.nextId&&(l=r.getNode(e.nextId)),(e=>{let t=null;return e.nextId&&(t=r.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t})(e))return s.push(e);if(e.node.rootId&&!r.getNode(e.node.rootId))return;const c=e.node.rootId?r.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Mc(o,r))return void this.attachDocumentToIframe(e,o);const h=(e,t)=>{if(!this.usingVirtualDom){wu(e);for(const r of this.config.plugins||[])r.onBuild&&r.onBuild(e,{id:t,replayer:this})}},u=ls(e.node,{doc:c,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:h});if(-1===e.previousId||-1===e.nextId)return void(n[e.node.id]={node:u,mutation:e});const d=r.getMeta(o);if(d&&d.type===Jc.Element&&e.node.type===Jc.Text){const e=Array.isArray(o.childNodes)?o.childNodes:Array.from(o.childNodes);if("textarea"===d.tagName)for(const t of e)t.nodeType===o.TEXT_NODE&&o.removeChild(t);else if("style"===d.tagName&&1===e.length)for(const t of e)t.nodeType!==o.TEXT_NODE||r.hasNode(t)||(u.textContent=t.textContent,o.removeChild(t))}else if((null==d?void 0:d.type)===Jc.Document){const r=o;e.node.type===Jc.DocumentType&&(null==(t=r.childNodes[0])?void 0:t.nodeType)===Node.DOCUMENT_TYPE_NODE&&r.removeChild(r.childNodes[0]),"HTML"===u.nodeName&&r.documentElement&&r.removeChild(r.documentElement)}if(a&&a.nextSibling&&a.nextSibling.parentNode?o.insertBefore(u,a.nextSibling):l&&l.parentNode?o.contains(l)?o.insertBefore(u,l):o.insertBefore(u,null):o.appendChild(u),h(u,e.node.id),this.usingVirtualDom&&"#text"===u.nodeName&&"STYLE"===o.nodeName&&(null==(i=o.rules)?void 0:i.length)>0&&(o.rules=[]),Mc(u,this.mirror)){const e=this.mirror.getId(u),t=this.newDocumentQueue.find(t=>t.parentId===e);t&&(this.attachDocumentToIframe(t,u),this.newDocumentQueue=this.newDocumentQueue.filter(e=>e!==t))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(n,o,u,e)};e.adds.forEach(e=>{i(e)});const o=Date.now();for(;s.length;){const e=Ic(s);if(s.length=0,Date.now()-o>500){this.warn("Timeout in the loop, please check the resolve tree data:",e);break}const t=[];let n=0;for(const s of e){if(r.getNode(s.value.parentId))Ac(s,e=>{i(e)});else{const e=r=>{t.push(r.value),r.children.forEach(t=>e(t))};e(s),n++}}if(n===e.length){for(const t of e)this.debug("Drop resolve tree since there is no parent for the root node.",t);break}s.push(...t)}Object.keys(n).length&&Object.assign(this.legacy_missingNodeRetryMap,n),Lc(e.texts).forEach(t=>{var n;const s=r.getNode(t.id);if(!s){if(e.removes.find(e=>e.id===t.id))return;return this.warnNodeNotFound(e,t.id)}const i=s.parentElement;if(t.value&&i&&"STYLE"===i.tagName?s.textContent=ss(t.value,this.cache):s.textContent=t.value,this.usingVirtualDom){const e=s.parentNode;(null==(n=null==e?void 0:e.rules)?void 0:n.length)>0&&(e.rules=[])}}),e.attributes.forEach(t=>{var n;const s=r.getNode(t.id);if(!s){if(e.removes.find(e=>e.id===t.id))return;return this.warnNodeNotFound(e,t.id)}for(const e in t.attributes)if("string"==typeof e){const i=t.attributes[e];if(null===i)s.removeAttribute(e),"open"===e&&bu(s,t);else if("string"==typeof i)try{if("_cssText"===e&&("LINK"===s.nodeName||"STYLE"===s.nodeName))try{const e=r.getMeta(s),n=ls(p(d({},e),{attributes:d(d({},e.attributes),t.attributes)}),{doc:s.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(e.attributes,t.attributes);const i=s.nextSibling,o=s.parentNode;if(n&&o){o.removeChild(s),o.insertBefore(n,i),r.replace(t.id,n);break}}catch(e){}if("value"===e&&"TEXTAREA"===s.nodeName){const e=s;e.childNodes.forEach(t=>e.removeChild(t));const t=null==(n=s.ownerDocument)?void 0:n.createTextNode(i);t&&e.appendChild(t)}else s.setAttribute(e,i);"rr_open_mode"===e&&"DIALOG"===s.nodeName&&wu(s,t)}catch(e){this.warn("An error occurred may due to the checkout feature.",e)}else if("style"===e){const e=i,t=s;for(const r in e)if(!1===e[r])t.style.removeProperty(r);else if(e[r]instanceof Array){const n=e[r];t.style.setProperty(r,n[0],n[1])}else{const n=e[r];t.style.setProperty(r,n)}}}})}applyScroll(e,t){var r,n;const s=this.mirror.getNode(e.id);if(!s)return this.debugNodeNotFound(e,e.id);const i=this.mirror.getMeta(s);if(s===this.iframe.contentDocument)null==(r=this.iframe.contentWindow)||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((null==i?void 0:i.type)===Jc.Document)null==(n=s.defaultView)||n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{s.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(e){}}applyInput(e){const t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}}applySelection(e){try{const t=new Set,r=e.ranges.map(({start:e,startOffset:r,end:n,endOffset:s})=>{const i=this.mirror.getNode(e),o=this.mirror.getNode(n);if(!i||!o)return;const a=new Range;a.setStart(i,r),a.setEnd(o,s);const l=i.ownerDocument,c=null==l?void 0:l.getSelection();return c&&t.add(c),{range:a,selection:c}});t.forEach(e=>e.removeAllRanges()),r.forEach(e=>{var t;return e&&(null==(t=e.selection)?void 0:t.addRange(e.range))})}catch(e){}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=(null==(t=this.mirror.getNode(e.id))?void 0:t.sheet)||null),r&&(e.source===Vc.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===Vc.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,n,s,i;if(null==(r=e.adds)||r.forEach(({rule:e,index:r})=>{try{if(Array.isArray(r)){const{positions:n,index:s}=Dc(r);Nc(t.cssRules,n).insertRule(e,s)}else{const n=void 0===r?void 0:Math.min(r,t.cssRules.length);null==t||t.insertRule(e,n)}}catch(e){}}),null==(n=e.removes)||n.forEach(({index:e})=>{try{if(Array.isArray(e)){const{positions:r,index:n}=Dc(e);Nc(t.cssRules,r).deleteRule(n||0)}else null==t||t.deleteRule(e)}catch(e){}}),e.replace)try{null==(s=t.replace)||s.call(t,e.replace)}catch(e){}if(e.replaceSync)try{null==(i=t.replaceSync)||i.call(t,e.replaceSync)}catch(e){}}applyStyleDeclaration(e,t){if(e.set){Nc(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority)}if(e.remove){Nc(t.rules,e.index).style.removeProperty(e.remove.property)}}applyAdoptedStyleSheet(e){var t;const r=this.mirror.getNode(e.id);if(!r)return;null==(t=e.styles)||t.forEach(e=>{var t;let n=null,s=null;if(Oc(r)?s=(null==(t=r.ownerDocument)?void 0:t.defaultView)||null:"#document"===r.nodeName&&(s=r.defaultView),s)try{n=new s.CSSStyleSheet,this.styleMirror.add(n,e.styleId),this.applyStyleSheetRule({source:Vc.StyleSheetRule,adds:e.rules},n)}catch(e){}});let n=0;const s=(e,t)=>{const r=t.map(e=>this.styleMirror.getStyle(e)).filter(e=>null!==e);Oc(e)?e.shadowRoot.adoptedStyleSheets=r:"#document"===e.nodeName&&(e.adoptedStyleSheets=r),r.length!==t.length&&n<10&&(setTimeout(()=>s(e,t),0+100*n),n++)};s(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,n){const{previousId:s,nextId:i}=n,o=s&&e[s],a=i&&e[i];if(o){const{node:n,mutation:s}=o;t.insertBefore(n,r),delete e[s.node.id],delete this.legacy_missingNodeRetryMap[s.node.id],(s.previousId||s.nextId)&&this.legacy_resolveMissingNode(e,t,n,s)}if(a){const{node:n,mutation:s}=a;t.insertBefore(n,r.nextSibling),delete e[s.node.id],delete this.legacy_missingNodeRetryMap[s.node.id],(s.previousId||s.nextId)&&this.legacy_resolveMissingNode(e,t,n,s)}}moveAndHover(e,t,r,n,s){const i=this.mirror.getNode(r);if(!i)return this.debugNodeNotFound(s,r);const o=Rc(i,this.iframe),a=e*o.absoluteScale+o.x,l=t*o.absoluteScale+o.y;this.mouse.style.left=a+"px",this.mouse.style.top=l+"px",n||this.drawMouseTail({x:a,y:l}),this.hoverElements(i)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:r,strokeStyle:n,duration:s}=!0===this.config.mouseTail?Su:Object.assign({},Su,this.config.mouseTail),i=()=>{if(!this.mouseTail)return;const e=this.mouseTail.getContext("2d");e&&this.tailPositions.length&&(e.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),e.beginPath(),e.lineWidth=r,e.lineCap=t,e.strokeStyle=n,e.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(t=>e.lineTo(t.x,t.y)),e.stroke())};this.tailPositions.push(e),i(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(t=>t!==e),i()},s/this.speedService.state.context.timer.speed)}hoverElements(e){var t;null==(t=this.lastHoveredRootNode||this.iframe.contentDocument)||t.querySelectorAll(".\\:hover").forEach(e=>{e.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type===Wc.IncrementalSnapshot&&(e.data.source>Vc.Mutation&&e.data.source<=Vc.Input)}backToNormal(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Xc.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn("[replayer]",...e)}debug(...e){this.config.showDebug&&this.config.logger.log("[replayer]",...e)}}const{addCustomEvent:ku}=Yh,{freezePage:xu}=Yh,{takeFullSnapshot:Eu}=Yh}.call(this,r(54).Buffer,r(58))},37:function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},48:function(e,t,r){"use strict"; /*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */function n(e){let t=e.length;for(;--t>=0;)e[t]=0}const s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),i=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),a=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=new Array(576);n(l);const c=new Array(60);n(c);const h=new Array(512);n(h);const u=new Array(256);n(u);const d=new Array(29);n(d);const p=new Array(30);function f(e,t,r,n,s){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=s,this.has_stree=e&&e.length}let m,g,y;function w(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}n(p);const b=e=>e<256?h[e]:h[256+(e>>>7)],v=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},S=(e,t,r)=>{e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<{S(e,r[2*t],r[2*t+1])},C=(e,t)=>{let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1},k=(e,t,r)=>{const n=new Array(16);let s,i,o=0;for(s=1;s<=15;s++)o=o+r[s-1]<<1,n[s]=o;for(i=0;i<=t;i++){let t=e[2*i+1];0!==t&&(e[2*i]=C(n[t]++,t))}},x=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},E=e=>{e.bi_valid>8?v(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},I=(e,t,r,n)=>{const s=2*t,i=2*r;return e[s]{const n=e.heap[r];let s=r<<1;for(;s<=e.heap_len&&(s{let n,o,a,l,c=0;if(0!==e.sym_next)do{n=255&e.pending_buf[e.sym_buf+c++],n+=(255&e.pending_buf[e.sym_buf+c++])<<8,o=e.pending_buf[e.sym_buf+c++],0===n?_(e,o,t):(a=u[o],_(e,a+256+1,t),l=s[a],0!==l&&(o-=d[a],S(e,o,l)),n--,a=b(n),_(e,a,r),l=i[a],0!==l&&(n-=p[a],S(e,n,l)))}while(c{const r=t.dyn_tree,n=t.stat_desc.static_tree,s=t.stat_desc.has_stree,i=t.stat_desc.elems;let o,a,l,c=-1;for(e.heap_len=0,e.heap_max=573,o=0;o>1;o>=1;o--)A(e,r,o);l=i;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],A(e,r,1),a=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=a,r[2*l]=r[2*o]+r[2*a],e.depth[l]=(e.depth[o]>=e.depth[a]?e.depth[o]:e.depth[a])+1,r[2*o+1]=r[2*a+1]=l,e.heap[1]=l++,A(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const r=t.dyn_tree,n=t.max_code,s=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,l=t.stat_desc.max_length;let c,h,u,d,p,f,m=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(r[2*e.heap[e.heap_max]+1]=0,c=e.heap_max+1;c<573;c++)h=e.heap[c],d=r[2*r[2*h+1]+1]+1,d>l&&(d=l,m++),r[2*h+1]=d,h>n||(e.bl_count[d]++,p=0,h>=a&&(p=o[h-a]),f=r[2*h],e.opt_len+=f*(d+p),i&&(e.static_len+=f*(s[2*h+1]+p)));if(0!==m){do{for(d=l-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[l]--,m-=2}while(m>0);for(d=l;0!==d;d--)for(h=e.bl_count[d];0!==h;)u=e.heap[--c],u>n||(r[2*u+1]!==d&&(e.opt_len+=(d-r[2*u+1])*r[2*u],r[2*u+1]=d),h--)}})(e,t),k(r,c,e.bl_count)},R=(e,t,r)=>{let n,s,i=-1,o=t[1],a=0,l=7,c=4;for(0===o&&(l=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)s=o,o=t[2*(n+1)+1],++a{let n,s,i=-1,o=t[1],a=0,l=7,c=4;for(0===o&&(l=138,c=3),n=0;n<=r;n++)if(s=o,o=t[2*(n+1)+1],!(++a{S(e,0+(n?1:0),3),E(e),v(e,r),v(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r};var L={_tr_init:e=>{N||((()=>{let e,t,r,n,a;const w=new Array(16);for(r=0,n=0;n<28;n++)for(d[n]=r,e=0;e<1<>=7;n<30;n++)for(p[n]=a<<7,e=0;e<1<{let s,i,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),T(e,e.l_desc),T(e,e.d_desc),o=(e=>{let t;for(R(e,e.dyn_ltree,e.l_desc.max_code),R(e,e.dyn_dtree,e.d_desc.max_code),T(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*a[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),s=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=s&&(s=i)):s=i=r+5,r+4<=s&&-1!==t?D(e,t,r,n):4===e.strategy||i===s?(S(e,2+(n?1:0),3),M(e,l,c)):(S(e,4+(n?1:0),3),((e,t,r,n)=>{let s;for(S(e,t-257,5),S(e,r-1,5),S(e,n-4,4),s=0;s(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(u[r]+256+1)]++,e.dyn_dtree[2*b(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{S(e,2,3),_(e,256,l),(e=>{16===e.bi_valid?(v(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}};var P=(e,t,r,n)=>{let s=65535&e|0,i=e>>>16&65535|0,o=0;for(;0!==r;){o=r>2e3?2e3:r,r-=o;do{s=s+t[n++]|0,i=i+s|0}while(--o);s%=65521,i%=65521}return s|i<<16|0};const F=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());var U=(e,t,r,n)=>{const s=F,i=n+r;e^=-1;for(let r=n;r>>8^s[255&(e^t[r])];return-1^e},B={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},z={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:j,_tr_stored_block:W,_tr_flush_block:V,_tr_tally:Y,_tr_align:Z}=L,{Z_NO_FLUSH:G,Z_PARTIAL_FLUSH:H,Z_FULL_FLUSH:X,Z_FINISH:J,Z_BLOCK:K,Z_OK:$,Z_STREAM_END:Q,Z_STREAM_ERROR:q,Z_DATA_ERROR:ee,Z_BUF_ERROR:te,Z_DEFAULT_COMPRESSION:re,Z_FILTERED:ne,Z_HUFFMAN_ONLY:se,Z_RLE:ie,Z_FIXED:oe,Z_DEFAULT_STRATEGY:ae,Z_UNKNOWN:le,Z_DEFLATED:ce}=z,he=(e,t)=>(e.msg=B[t],t),ue=e=>2*e-(e>4?9:0),de=e=>{let t=e.length;for(;--t>=0;)e[t]=0},pe=e=>{let t,r,n,s=e.w_size;t=e.hash_size,n=t;do{r=e.head[--n],e.head[n]=r>=s?r-s:0}while(--t);t=s,n=t;do{r=e.prev[--n],e.prev[n]=r>=s?r-s:0}while(--t)};let fe=(e,t,r)=>(t<{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},ge=(e,t)=>{V(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,me(e.strm)},ye=(e,t)=>{e.pending_buf[e.pending++]=t},we=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},be=(e,t,r,n)=>{let s=e.avail_in;return s>n&&(s=n),0===s?0:(e.avail_in-=s,t.set(e.input.subarray(e.next_in,e.next_in+s),r),1===e.state.wrap?e.adler=P(e.adler,t,s,r):2===e.state.wrap&&(e.adler=U(e.adler,t,s,r)),e.next_in+=s,e.total_in+=s,s)},ve=(e,t)=>{let r,n,s=e.max_chain_length,i=e.strstart,o=e.prev_length,a=e.nice_match;const l=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,h=e.w_mask,u=e.prev,d=e.strstart+258;let p=c[i+o-1],f=c[i+o];e.prev_length>=e.good_match&&(s>>=2),a>e.lookahead&&(a=e.lookahead);do{if(r=t,c[r+o]===f&&c[r+o-1]===p&&c[r]===c[i]&&c[++r]===c[i+1]){i+=2,r++;do{}while(c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&io){if(e.match_start=t,o=n,n>=a)break;p=c[i+o-1],f=c[i+o]}}}while((t=u[t&h])>l&&0!=--s);return o<=e.lookahead?o:e.lookahead},Se=e=>{const t=e.w_size;let r,n,s;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),pe(e),n+=t),0===e.strm.avail_in)break;if(r=be(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=r,e.lookahead+e.insert>=3)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=fe(e,e.ins_h,e.window[s+1]);e.insert&&(e.ins_h=fe(e,e.ins_h,e.window[s+3-1]),e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},_e=(e,t)=>{let r,n,s,i=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,o=0,a=e.strm.avail_in;do{if(r=65535,s=e.bi_valid+42>>3,e.strm.avail_outn+e.strm.avail_in&&(r=n+e.strm.avail_in),r>s&&(r=s),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,me(e.strm),n&&(n>r&&(n=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+n),e.strm.next_out),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n,e.block_start+=n,r-=n),r&&(be(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(0===o);return a-=e.strm.avail_in,a&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_waters&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,s+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),s>e.strm.avail_in&&(s=e.strm.avail_in),s&&(be(e.strm,e.window,e.strstart,s),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.high_water>3,s=e.pending_buf_size-s>65535?65535:e.pending_buf_size-s,i=s>e.w_size?e.w_size:s,n=e.strstart-e.block_start,(n>=i||(n||t===J)&&t!==G&&0===e.strm.avail_in&&n<=s)&&(r=n>s?s:n,o=t===J&&0===e.strm.avail_in&&r===n?1:0,W(e,e.block_start,r,o),e.block_start+=r,me(e.strm)),o?3:1)},Ce=(e,t)=>{let r,n;for(;;){if(e.lookahead<262){if(Se(e),e.lookahead<262&&t===G)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=fe(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-262&&(e.match_length=ve(e,r)),e.match_length>=3)if(n=Y(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=fe(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=fe(e,e.ins_h,e.window[e.strstart+1]);else n=Y(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(ge(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===J?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2},ke=(e,t)=>{let r,n,s;for(;;){if(e.lookahead<262){if(Se(e),e.lookahead<262&&t===G)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=fe(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){s=e.strstart+e.lookahead-3,n=Y(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=s&&(e.ins_h=fe(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(ge(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=Y(e,0,e.window[e.strstart-1]),n&&ge(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Y(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===J?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2};function xe(e,t,r,n,s){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=s}const Ee=[new xe(0,0,0,0,_e),new xe(4,4,8,4,Ce),new xe(4,5,16,8,Ce),new xe(4,6,32,32,Ce),new xe(4,4,16,16,ke),new xe(8,16,32,32,ke),new xe(8,16,128,128,ke),new xe(8,32,128,256,ke),new xe(32,128,258,1024,ke),new xe(32,258,258,4096,ke)];function Ie(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ce,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),de(this.dyn_ltree),de(this.dyn_dtree),de(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),de(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),de(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ae=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||42!==t.status&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&113!==t.status&&666!==t.status?1:0},Me=e=>{if(Ae(e))return he(e,q);e.total_in=e.total_out=0,e.data_type=le;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=-2,j(t),$},Te=e=>{const t=Me(e);var r;return t===$&&((r=e.state).window_size=2*r.w_size,de(r.head),r.max_lazy_match=Ee[r.level].max_lazy,r.good_match=Ee[r.level].good_length,r.nice_match=Ee[r.level].nice_length,r.max_chain_length=Ee[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),t},Re=(e,t,r,n,s,i)=>{if(!e)return q;let o=1;if(t===re&&(t=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),s<1||s>9||r!==ce||n<8||n>15||t<0||t>9||i<0||i>oe||8===n&&1!==o)return he(e,q);8===n&&(n=9);const a=new Ie;return e.state=a,a.strm=e,a.status=42,a.wrap=o,a.gzhead=null,a.w_bits=n,a.w_size=1<Re(e,t,ce,15,8,ae),deflateInit2:Re,deflateReset:Te,deflateResetKeep:Me,deflateSetHeader:(e,t)=>Ae(e)||2!==e.state.wrap?q:(e.state.gzhead=t,$),deflate:(e,t)=>{if(Ae(e)||t>K||t<0)return e?he(e,q):q;const r=e.state;if(!e.output||0!==e.avail_in&&!e.input||666===r.status&&t!==J)return he(e,0===e.avail_out?te:q);const n=r.last_flush;if(r.last_flush=t,0!==r.pending){if(me(e),0===e.avail_out)return r.last_flush=-1,$}else if(0===e.avail_in&&ue(t)<=ue(n)&&t!==J)return he(e,te);if(666===r.status&&0!==e.avail_in)return he(e,te);if(42===r.status&&0===r.wrap&&(r.status=113),42===r.status){let t=ce+(r.w_bits-8<<4)<<8,n=-1;if(n=r.strategy>=se||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=n<<6,0!==r.strstart&&(t|=32),t+=31-t%31,we(r,t),0!==r.strstart&&(we(r,e.adler>>>16),we(r,65535&e.adler)),e.adler=1,r.status=113,me(e),0!==r.pending)return r.last_flush=-1,$}if(57===r.status)if(e.adler=0,ye(r,31),ye(r,139),ye(r,8),r.gzhead)ye(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),ye(r,255&r.gzhead.time),ye(r,r.gzhead.time>>8&255),ye(r,r.gzhead.time>>16&255),ye(r,r.gzhead.time>>24&255),ye(r,9===r.level?2:r.strategy>=se||r.level<2?4:0),ye(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(ye(r,255&r.gzhead.extra.length),ye(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=U(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(ye(r,0),ye(r,0),ye(r,0),ye(r,0),ye(r,0),ye(r,9===r.level?2:r.strategy>=se||r.level<2?4:0),ye(r,3),r.status=113,me(e),0!==r.pending)return r.last_flush=-1,$;if(69===r.status){if(r.gzhead.extra){let t=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let s=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+s),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>t&&(e.adler=U(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex+=s,me(e),0!==r.pending)return r.last_flush=-1,$;t=0,n-=s}let s=new Uint8Array(r.gzhead.extra);r.pending_buf.set(s.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>t&&(e.adler=U(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=U(e.adler,r.pending_buf,r.pending-n,n)),me(e),0!==r.pending)return r.last_flush=-1,$;n=0}t=r.gzindexn&&(e.adler=U(e.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=U(e.adler,r.pending_buf,r.pending-n,n)),me(e),0!==r.pending)return r.last_flush=-1,$;n=0}t=r.gzindexn&&(e.adler=U(e.adler,r.pending_buf,r.pending-n,n))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(me(e),0!==r.pending))return r.last_flush=-1,$;ye(r,255&e.adler),ye(r,e.adler>>8&255),e.adler=0}if(r.status=113,me(e),0!==r.pending)return r.last_flush=-1,$}if(0!==e.avail_in||0!==r.lookahead||t!==G&&666!==r.status){let n=0===r.level?_e(r,t):r.strategy===se?((e,t)=>{let r;for(;;){if(0===e.lookahead&&(Se(e),0===e.lookahead)){if(t===G)return 1;break}if(e.match_length=0,r=Y(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(ge(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===J?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===ie?((e,t)=>{let r,n,s,i;const o=e.window;for(;;){if(e.lookahead<=258){if(Se(e),e.lookahead<=258&&t===G)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(s=e.strstart-1,n=o[s],n===o[++s]&&n===o[++s]&&n===o[++s])){i=e.strstart+258;do{}while(n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&se.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=Y(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Y(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(ge(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===J?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2})(r,t):Ee[r.level].func(r,t);if(3!==n&&4!==n||(r.status=666),1===n||3===n)return 0===e.avail_out&&(r.last_flush=-1),$;if(2===n&&(t===H?Z(r):t!==K&&(W(r,0,0,!1),t===X&&(de(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),me(e),0===e.avail_out))return r.last_flush=-1,$}return t!==J?$:r.wrap<=0?Q:(2===r.wrap?(ye(r,255&e.adler),ye(r,e.adler>>8&255),ye(r,e.adler>>16&255),ye(r,e.adler>>24&255),ye(r,255&e.total_in),ye(r,e.total_in>>8&255),ye(r,e.total_in>>16&255),ye(r,e.total_in>>24&255)):(we(r,e.adler>>>16),we(r,65535&e.adler)),me(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?$:Q)},deflateEnd:e=>{if(Ae(e))return q;const t=e.state.status;return e.state=null,113===t?he(e,ee):$},deflateSetDictionary:(e,t)=>{let r=t.length;if(Ae(e))return q;const n=e.state,s=n.wrap;if(2===s||1===s&&42!==n.status||n.lookahead)return q;if(1===s&&(e.adler=P(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){0===s&&(de(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(r-n.w_size,r),0),t=e,r=n.w_size}const i=e.avail_in,o=e.next_in,a=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,Se(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=fe(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,Se(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=o,e.input=a,e.avail_in=i,n.wrap=s,$},deflateInfo:"pako deflate (from Nodeca project)"};const Ne=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var De=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const t in r)Ne(r,t)&&(e[t]=r[t])}}return e},Le=e=>{let t=0;for(let r=0,n=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Fe[254]=Fe[254]=1;var Ue=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,r,n,s,i,o=e.length,a=0;for(s=0;s>>6,t[i++]=128|63&r):r<65536?(t[i++]=224|r>>>12,t[i++]=128|r>>>6&63,t[i++]=128|63&r):(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63,t[i++]=128|r>>>6&63,t[i++]=128|63&r);return t},Be=(e,t)=>{const r=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let n,s;const i=new Array(2*r);for(s=0,n=0;n4)i[s++]=65533,n+=o-1;else{for(t&=2===o?31:3===o?15:7;o>1&&n1?i[s++]=65533:t<65536?i[s++]=t:(t-=65536,i[s++]=55296|t>>10&1023,i[s++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Pe)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let n=0;n{(t=t||e.length)>e.length&&(t=e.length);let r=t-1;for(;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+Fe[e[r]]>t?r:t};var je=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const We=Object.prototype.toString,{Z_NO_FLUSH:Ve,Z_SYNC_FLUSH:Ye,Z_FULL_FLUSH:Ze,Z_FINISH:Ge,Z_OK:He,Z_STREAM_END:Xe,Z_DEFAULT_COMPRESSION:Je,Z_DEFAULT_STRATEGY:Ke,Z_DEFLATED:$e}=z;function Qe(e){this.options=De({level:Je,method:$e,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ke},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new je,this.strm.avail_out=0;let r=Oe.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==He)throw new Error(B[r]);if(t.header&&Oe.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?Ue(t.dictionary):"[object ArrayBuffer]"===We.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,r=Oe.deflateSetDictionary(this.strm,e),r!==He)throw new Error(B[r]);this._dict_set=!0}}function qe(e,t){const r=new Qe(t);if(r.push(e,!0),r.err)throw r.msg||B[r.err];return r.result}Qe.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize;let s,i;if(this.ended)return!1;for(i=t===~~t?t:!0===t?Ge:Ve,"string"==typeof e?r.input=Ue(e):"[object ArrayBuffer]"===We.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(i===Ye||i===Ze)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(s=Oe.deflate(r,i),s===Xe)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),s=Oe.deflateEnd(this.strm),this.onEnd(s),this.ended=!0,s===He;if(0!==r.avail_out){if(i>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Qe.prototype.onData=function(e){this.chunks.push(e)},Qe.prototype.onEnd=function(e){e===He&&(this.result=Le(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var et={Deflate:Qe,deflate:qe,deflateRaw:function(e,t){return(t=t||{}).raw=!0,qe(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,qe(e,t)},constants:z};var tt=function(e,t){let r,n,s,i,o,a,l,c,h,u,d,p,f,m,g,y,w,b,v,S,_,C,k,x;const E=e.state;r=e.next_in,k=e.input,n=r+(e.avail_in-5),s=e.next_out,x=e.output,i=s-(t-e.avail_out),o=s+(e.avail_out-257),a=E.dmax,l=E.wsize,c=E.whave,h=E.wnext,u=E.window,d=E.hold,p=E.bits,f=E.lencode,m=E.distcode,g=(1<>>24,d>>>=b,p-=b,b=w>>>16&255,0===b)x[s++]=65535&w;else{if(!(16&b)){if(0==(64&b)){w=f[(65535&w)+(d&(1<>>=b,p-=b),p<15&&(d+=k[r++]<>>24,d>>>=b,p-=b,b=w>>>16&255,!(16&b)){if(0==(64&b)){w=m[(65535&w)+(d&(1<a){e.msg="invalid distance too far back",E.mode=16209;break e}if(d>>>=b,p-=b,b=s-i,S>b){if(b=S-b,b>c&&E.sane){e.msg="invalid distance too far back",E.mode=16209;break e}if(_=0,C=u,0===h){if(_+=l-b,b2;)x[s++]=C[_++],x[s++]=C[_++],x[s++]=C[_++],v-=3;v&&(x[s++]=C[_++],v>1&&(x[s++]=C[_++]))}else{_=s-S;do{x[s++]=x[_++],x[s++]=x[_++],x[s++]=x[_++],v-=3}while(v>2);v&&(x[s++]=x[_++],v>1&&(x[s++]=x[_++]))}break}}break}}while(r>3,r-=v,p-=v<<3,d&=(1<{const l=a.bits;let c,h,u,d,p,f,m=0,g=0,y=0,w=0,b=0,v=0,S=0,_=0,C=0,k=0,x=null;const E=new Uint16Array(16),I=new Uint16Array(16);let A,M,T,R=null;for(m=0;m<=15;m++)E[m]=0;for(g=0;g=1&&0===E[w];w--);if(b>w&&(b=w),0===w)return s[i++]=20971520,s[i++]=20971520,a.bits=1,0;for(y=1;y0&&(0===e||1!==w))return-1;for(I[1]=0,m=1;m<15;m++)I[m+1]=I[m]+E[m];for(g=0;g852||2===e&&C>592)return 1;for(;;){A=m-S,o[g]+1=f?(M=R[o[g]-f],T=x[o[g]-f]):(M=96,T=0),c=1<>S)+h]=A<<24|M<<16|T|0}while(0!==h);for(c=1<>=1;if(0!==c?(k&=c-1,k+=c):k=0,g++,0==--E[m]){if(m===w)break;m=t[r+o[g]]}if(m>b&&(k&d)!==u){for(0===S&&(S=b),p+=y,v=m-S,_=1<852||2===e&&C>592)return 1;u=k&d,s[u]=b<<24|v<<16|p-i|0}}return 0!==k&&(s[p+k]=m-S<<24|64<<16|0),a.bits=b,0};const{Z_FINISH:at,Z_BLOCK:lt,Z_TREES:ct,Z_OK:ht,Z_STREAM_END:ut,Z_NEED_DICT:dt,Z_STREAM_ERROR:pt,Z_DATA_ERROR:ft,Z_MEM_ERROR:mt,Z_BUF_ERROR:gt,Z_DEFLATED:yt}=z,wt=16209,bt=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function vt(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const St=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<16180||t.mode>16211?1:0},_t=e=>{if(St(e))return pt;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=16180,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,ht},Ct=e=>{if(St(e))return pt;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,_t(e)},kt=(e,t)=>{let r;if(St(e))return pt;const n=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?pt:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,Ct(e))},xt=(e,t)=>{if(!e)return pt;const r=new vt;e.state=r,r.strm=e,r.window=null,r.mode=16180;const n=kt(e,t);return n!==ht&&(e.state=null),n};let Et,It,At=!0;const Mt=e=>{if(At){Et=new Int32Array(512),It=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ot(1,e.lens,0,288,Et,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ot(2,e.lens,0,32,It,0,e.work,{bits:5}),At=!1}e.lencode=Et,e.lenbits=9,e.distcode=It,e.distbits=5},Tt=(e,t,r,n)=>{let s;const i=e.state;return null===i.window&&(i.wsize=1<=i.wsize?(i.window.set(t.subarray(r-i.wsize,r),0),i.wnext=0,i.whave=i.wsize):(s=i.wsize-i.wnext,s>n&&(s=n),i.window.set(t.subarray(r-n,r-n+s),i.wnext),(n-=s)?(i.window.set(t.subarray(r-n,r),0),i.wnext=n,i.whave=i.wsize):(i.wnext+=s,i.wnext===i.wsize&&(i.wnext=0),i.whavext(e,15),inflateInit2:xt,inflate:(e,t)=>{let r,n,s,i,o,a,l,c,h,u,d,p,f,m,g,y,w,b,v,S,_,C,k=0;const x=new Uint8Array(4);let E,I;const A=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(St(e)||!e.output||!e.input&&0!==e.avail_in)return pt;r=e.state,16191===r.mode&&(r.mode=16192),o=e.next_out,s=e.output,l=e.avail_out,i=e.next_in,n=e.input,a=e.avail_in,c=r.hold,h=r.bits,u=a,d=l,C=ht;e:for(;;)switch(r.mode){case 16180:if(0===r.wrap){r.mode=16192;break}for(;h<16;){if(0===a)break e;a--,c+=n[i++]<>>8&255,r.check=U(r.check,x,2,0),c=0,h=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",r.mode=wt;break}if((15&c)!==yt){e.msg="unknown compression method",r.mode=wt;break}if(c>>>=4,h-=4,_=8+(15&c),0===r.wbits&&(r.wbits=_),_>15||_>r.wbits){e.msg="invalid window size",r.mode=wt;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(x[0]=255&c,x[1]=c>>>8&255,r.check=U(r.check,x,2,0)),c=0,h=0,r.mode=16182;case 16182:for(;h<32;){if(0===a)break e;a--,c+=n[i++]<>>8&255,x[2]=c>>>16&255,x[3]=c>>>24&255,r.check=U(r.check,x,4,0)),c=0,h=0,r.mode=16183;case 16183:for(;h<16;){if(0===a)break e;a--,c+=n[i++]<>8),512&r.flags&&4&r.wrap&&(x[0]=255&c,x[1]=c>>>8&255,r.check=U(r.check,x,2,0)),c=0,h=0,r.mode=16184;case 16184:if(1024&r.flags){for(;h<16;){if(0===a)break e;a--,c+=n[i++]<>>8&255,r.check=U(r.check,x,2,0)),c=0,h=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(p=r.length,p>a&&(p=a),p&&(r.head&&(_=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(i,i+p),_)),512&r.flags&&4&r.wrap&&(r.check=U(r.check,n,p,i)),a-=p,i+=p,r.length-=p),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===a)break e;p=0;do{_=n[i+p++],r.head&&_&&r.length<65536&&(r.head.name+=String.fromCharCode(_))}while(_&&p>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=16191;break;case 16189:for(;h<32;){if(0===a)break e;a--,c+=n[i++]<>>=7&h,h-=7&h,r.mode=16206;break}for(;h<3;){if(0===a)break e;a--,c+=n[i++]<>>=1,h-=1,3&c){case 0:r.mode=16193;break;case 1:if(Mt(r),r.mode=16199,t===ct){c>>>=2,h-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=wt}c>>>=2,h-=2;break;case 16193:for(c>>>=7&h,h-=7&h;h<32;){if(0===a)break e;a--,c+=n[i++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=wt;break}if(r.length=65535&c,c=0,h=0,r.mode=16194,t===ct)break e;case 16194:r.mode=16195;case 16195:if(p=r.length,p){if(p>a&&(p=a),p>l&&(p=l),0===p)break e;s.set(n.subarray(i,i+p),o),a-=p,i+=p,l-=p,o+=p,r.length-=p;break}r.mode=16191;break;case 16196:for(;h<14;){if(0===a)break e;a--,c+=n[i++]<>>=5,h-=5,r.ndist=1+(31&c),c>>>=5,h-=5,r.ncode=4+(15&c),c>>>=4,h-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=wt;break}r.have=0,r.mode=16197;case 16197:for(;r.have>>=3,h-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,E={bits:r.lenbits},C=ot(0,r.lens,0,19,r.lencode,0,r.work,E),r.lenbits=E.bits,C){e.msg="invalid code lengths set",r.mode=wt;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>24,y=k>>>16&255,w=65535&k,!(g<=h);){if(0===a)break e;a--,c+=n[i++]<>>=g,h-=g,r.lens[r.have++]=w;else{if(16===w){for(I=g+2;h>>=g,h-=g,0===r.have){e.msg="invalid bit length repeat",r.mode=wt;break}_=r.lens[r.have-1],p=3+(3&c),c>>>=2,h-=2}else if(17===w){for(I=g+3;h>>=g,h-=g,_=0,p=3+(7&c),c>>>=3,h-=3}else{for(I=g+7;h>>=g,h-=g,_=0,p=11+(127&c),c>>>=7,h-=7}if(r.have+p>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=wt;break}for(;p--;)r.lens[r.have++]=_}}if(r.mode===wt)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=wt;break}if(r.lenbits=9,E={bits:r.lenbits},C=ot(1,r.lens,0,r.nlen,r.lencode,0,r.work,E),r.lenbits=E.bits,C){e.msg="invalid literal/lengths set",r.mode=wt;break}if(r.distbits=6,r.distcode=r.distdyn,E={bits:r.distbits},C=ot(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,E),r.distbits=E.bits,C){e.msg="invalid distances set",r.mode=wt;break}if(r.mode=16199,t===ct)break e;case 16199:r.mode=16200;case 16200:if(a>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=i,e.avail_in=a,r.hold=c,r.bits=h,tt(e,d),o=e.next_out,s=e.output,l=e.avail_out,i=e.next_in,n=e.input,a=e.avail_in,c=r.hold,h=r.bits,16191===r.mode&&(r.back=-1);break}for(r.back=0;k=r.lencode[c&(1<>>24,y=k>>>16&255,w=65535&k,!(g<=h);){if(0===a)break e;a--,c+=n[i++]<>b)],g=k>>>24,y=k>>>16&255,w=65535&k,!(b+g<=h);){if(0===a)break e;a--,c+=n[i++]<>>=b,h-=b,r.back+=b}if(c>>>=g,h-=g,r.back+=g,r.length=w,0===y){r.mode=16205;break}if(32&y){r.back=-1,r.mode=16191;break}if(64&y){e.msg="invalid literal/length code",r.mode=wt;break}r.extra=15&y,r.mode=16201;case 16201:if(r.extra){for(I=r.extra;h>>=r.extra,h-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;k=r.distcode[c&(1<>>24,y=k>>>16&255,w=65535&k,!(g<=h);){if(0===a)break e;a--,c+=n[i++]<>b)],g=k>>>24,y=k>>>16&255,w=65535&k,!(b+g<=h);){if(0===a)break e;a--,c+=n[i++]<>>=b,h-=b,r.back+=b}if(c>>>=g,h-=g,r.back+=g,64&y){e.msg="invalid distance code",r.mode=wt;break}r.offset=w,r.extra=15&y,r.mode=16203;case 16203:if(r.extra){for(I=r.extra;h>>=r.extra,h-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=wt;break}r.mode=16204;case 16204:if(0===l)break e;if(p=d-l,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=wt;break}p>r.wnext?(p-=r.wnext,f=r.wsize-p):f=r.wnext-p,p>r.length&&(p=r.length),m=r.window}else m=s,f=o-r.offset,p=r.length;p>l&&(p=l),l-=p,r.length-=p;do{s[o++]=m[f++]}while(--p);0===r.length&&(r.mode=16200);break;case 16205:if(0===l)break e;s[o++]=r.length,l--,r.mode=16200;break;case 16206:if(r.wrap){for(;h<32;){if(0===a)break e;a--,c|=n[i++]<{if(St(e))return pt;let t=e.state;return t.window&&(t.window=null),e.state=null,ht},inflateGetHeader:(e,t)=>{if(St(e))return pt;const r=e.state;return 0==(2&r.wrap)?pt:(r.head=t,t.done=!1,ht)},inflateSetDictionary:(e,t)=>{const r=t.length;let n,s,i;return St(e)?pt:(n=e.state,0!==n.wrap&&16190!==n.mode?pt:16190===n.mode&&(s=1,s=P(s,t,r,0),s!==n.check)?ft:(i=Tt(e,t,r,r),i?(n.mode=16210,mt):(n.havedict=1,ht)))},inflateInfo:"pako inflate (from Nodeca project)"};var Ot=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Nt=Object.prototype.toString,{Z_NO_FLUSH:Dt,Z_FINISH:Lt,Z_OK:Pt,Z_STREAM_END:Ft,Z_NEED_DICT:Ut,Z_STREAM_ERROR:Bt,Z_DATA_ERROR:zt,Z_MEM_ERROR:jt}=z;function Wt(e){this.options=De({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new je,this.strm.avail_out=0;let r=Rt.inflateInit2(this.strm,t.windowBits);if(r!==Pt)throw new Error(B[r]);if(this.header=new Ot,Rt.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Ue(t.dictionary):"[object ArrayBuffer]"===Nt.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=Rt.inflateSetDictionary(this.strm,t.dictionary),r!==Pt)))throw new Error(B[r])}function Vt(e,t){const r=new Wt(t);if(r.push(e),r.err)throw r.msg||B[r.err];return r.result}Wt.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize,s=this.options.dictionary;let i,o,a;if(this.ended)return!1;for(o=t===~~t?t:!0===t?Lt:Dt,"[object ArrayBuffer]"===Nt.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),i=Rt.inflate(r,o),i===Ut&&s&&(i=Rt.inflateSetDictionary(r,s),i===Pt?i=Rt.inflate(r,o):i===zt&&(i=Ut));r.avail_in>0&&i===Ft&&r.state.wrap>0&&0!==e[r.next_in];)Rt.inflateReset(r),i=Rt.inflate(r,o);switch(i){case Bt:case zt:case Ut:case jt:return this.onEnd(i),this.ended=!0,!1}if(a=r.avail_out,r.next_out&&(0===r.avail_out||i===Ft))if("string"===this.options.to){let e=ze(r.output,r.next_out),t=r.next_out-e,s=Be(r.output,e);r.next_out=t,r.avail_out=n-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(s)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(i!==Pt||0!==a){if(i===Ft)return i=Rt.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},Wt.prototype.onData=function(e){this.chunks.push(e)},Wt.prototype.onEnd=function(e){e===Pt&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Le(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Yt={Inflate:Wt,inflate:Vt,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Vt(e,t)},ungzip:Vt,constants:z};const{Deflate:Zt,deflate:Gt,deflateRaw:Ht,gzip:Xt}=et,{Inflate:Jt,inflate:Kt,inflateRaw:$t,ungzip:Qt}=Yt;var qt=Gt,er=Kt,tr=Uint8Array,rr=Uint16Array,nr=Int32Array,sr=new tr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ir=new tr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),or=(new tr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),function(e,t){for(var r=new rr(31),n=0;n<31;++n)r[n]=t+=1<>1|(21845&dr)<<1;pr=(61680&(pr=(52428&pr)>>2|(13107&pr)<<2))>>4|(3855&pr)<<4,ur[dr]=((65280&pr)>>8|(255&pr)<<8)>>1}var fr=new tr(288);for(dr=0;dr<144;++dr)fr[dr]=8;for(dr=144;dr<256;++dr)fr[dr]=9;for(dr=256;dr<280;++dr)fr[dr]=7;for(dr=280;dr<288;++dr)fr[dr]=8;var mr=new tr(32);for(dr=0;dr<32;++dr)mr[dr]=5;var gr=new tr(0);var yr="undefined"!=typeof TextDecoder&&new TextDecoder;try{yr.decode(gr,{stream:!0}),1}catch(e){}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout;var wr=Uint8Array,br=Uint16Array,vr=Uint32Array,Sr=new wr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),_r=new wr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Cr=(new wr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),function(e,t){for(var r=new br(31),n=0;n<31;++n)r[n]=t+=1<>>1|(21845&Mr)<<1;Tr=(61680&(Tr=(52428&Tr)>>>2|(13107&Tr)<<2))>>>4|(3855&Tr)<<4,Ar[Mr]=((65280&Tr)>>>8|(255&Tr)<<8)>>>1}var Rr=new wr(288);for(Mr=0;Mr<144;++Mr)Rr[Mr]=8;for(Mr=144;Mr<256;++Mr)Rr[Mr]=9;for(Mr=256;Mr<280;++Mr)Rr[Mr]=7;for(Mr=280;Mr<288;++Mr)Rr[Mr]=8;var Or=new wr(32);for(Mr=0;Mr<32;++Mr)Or[Mr]=5;r.d(t,"a",(function(){return Lr}));Error;var Nr,Dr;!function(e){e.UNKNOWN_SCHEME="UNKNOWN_SCHEME"}(Nr||(Nr={})),function(e){e.V1="cv1",e.V2="cv2",e.V3="cv3"}(Dr||(Dr={}));class Lr{encode(e){const t=qt(JSON.stringify(e));return btoa(Lr.convertUint8ArrayToString(t))}decode(e){const t=er(new Uint8Array(atob(e).split("").map(e=>e.charCodeAt(0))));return JSON.parse(new TextDecoder("utf8").decode(t))}static convertUint8ArrayToString(e){const t=[];for(let r=0;r=t||r<0||g&&e-c>=i}function S(){var e=p();if(v(e))return _(e);a=setTimeout(S,function(e){var r=t-(e-l);return g?d(r,i-(e-c)):r}(e))}function _(e){return a=void 0,y&&n?w(e):(n=s=void 0,o)}function C(){var e=p(),r=v(e);if(n=arguments,s=this,l=e,r){if(void 0===a)return b(l);if(g)return a=setTimeout(S,t),w(l)}return void 0===a&&(a=setTimeout(S,t)),o}return t=m(t)||0,f(r)&&(h=!!r.leading,i=(g="maxWait"in r)?u(m(r.maxWait)||0,t):i,y="trailing"in r?!!r.trailing:y),C.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=l=s=a=void 0},C.flush=function(){return void 0===a?o:_(p())},C}}).call(this,r(37))},54:function(e,t,r){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var n=r(55),s=r(56),i=r(57);function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return j(e).length;default:if(n)return z(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,r);case"utf8":case"utf-8":return E(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,s){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=s?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(r<0){if(!s)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,s);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,s);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,s){var i,o=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,a/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(s){var h=-1;for(i=r;ia&&(r=a-l),i=r;i>=0;i--){for(var u=!0,d=0;ds&&(n=s):n=s;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var o=0;o>8,s=r%256,i.push(s),i.push(n);return i}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function E(e,t,r){r=Math.min(e.length,r);for(var n=[],s=t;s239?4:c>223?3:c>191?2:1;if(s+u<=r)switch(u){case 1:c<128&&(h=c);break;case 2:128==(192&(i=e[s+1]))&&(l=(31&c)<<6|63&i)>127&&(h=l);break;case 3:i=e[s+1],o=e[s+2],128==(192&i)&&128==(192&o)&&(l=(15&c)<<12|(63&i)<<6|63&o)>2047&&(l<55296||l>57343)&&(h=l);break;case 4:i=e[s+1],o=e[s+2],a=e[s+3],128==(192&i)&&128==(192&o)&&128==(192&a)&&(l=(15&c)<<18|(63&i)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(h=l)}null===h?(h=65533,u=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),s+=u}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},l.prototype.compare=function(e,t,r,n,s){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||r>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=r)return 0;if(n>=s)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(s>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),a=Math.min(i,o),c=this.slice(n,s),h=e.slice(t,r),u=0;us)&&(r=s),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":return S(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return C(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function I(e,t,r){var n="";r=Math.min(e.length,r);for(var s=t;sn)&&(r=n);for(var s="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,r,n,s,i){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n){t<0&&(t=65535+t+1);for(var s=0,i=Math.min(e.length-r,2);s>>8*(n?s:1-s)}function D(e,t,r,n){t<0&&(t=4294967295+t+1);for(var s=0,i=Math.min(e.length-r,4);s>>8*(n?s:3-s)&255}function L(e,t,r,n,s,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(e,t,r,n,i){return i||L(e,0,r,4),s.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,i){return i||L(e,0,r,8),s.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(s*=256);)n+=this[e+--t]*s;return n},l.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=this[e],s=1,i=0;++i=(s*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=t,s=1,i=this[e+--n];n>0&&(s*=256);)i+=this[e+--n]*s;return i>=(s*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),s.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),s.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),s.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),s.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||O(this,e,t,r,Math.pow(2,8*r)-1,0);var s=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+s]=e/i&255;return t+r},l.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var s=Math.pow(2,8*r-1);O(this,e,t,r,s-1,-s)}var i=0,o=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var s=Math.pow(2,8*r-1);O(this,e,t,r,s-1,-s)}var i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,r){return P(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return P(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--s)e[s+t]=this[s+r];else if(i<1e3||!l.TYPED_ARRAY_SUPPORT)for(s=0;s>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!s){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}s=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),s=r;continue}r=65536+(s-55296<<10|r-56320)}else s&&(t-=3)>-1&&i.push(239,191,189);if(s=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function j(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){for(var s=0;s=t.length||s>=e.length);++s)t[s+r]=e[s];return s}}).call(this,r(37))},55:function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=c(e),o=n[0],a=n[1],l=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,a)),h=0,u=a>0?o-4:o;for(r=0;r>16&255,l[h++]=t>>8&255,l[h++]=255&t;2===a&&(t=s[e.charCodeAt(r)]<<2|s[e.charCodeAt(r+1)]>>4,l[h++]=255&t);1===a&&(t=s[e.charCodeAt(r)]<<10|s[e.charCodeAt(r+1)]<<4|s[e.charCodeAt(r+2)]>>2,l[h++]=t>>8&255,l[h++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,s=r%3,i=[],o=0,a=r-s;oa?a:o+16383));1===s?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===s&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],s=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=o.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function h(e,t,r){for(var s,i,o=[],a=t;a>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},56:function(e,t){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ t.read=function(e,t,r,n,s){var i,o,a=8*s-n-1,l=(1<>1,h=-7,u=r?s-1:0,d=r?-1:1,p=e[t+u];for(u+=d,i=p&(1<<-h)-1,p>>=-h,h+=a;h>0;i=256*i+e[t+u],u+=d,h-=8);for(o=i&(1<<-h)-1,i>>=-h,h+=n;h>0;o=256*o+e[t+u],u+=d,h-=8);if(0===i)i=1-c;else{if(i===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),i-=c}return(p?-1:1)*o*Math.pow(2,i-n)},t.write=function(e,t,r,n,s,i){var o,a,l,c=8*i-s-1,h=(1<>1,d=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,f=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+u>=1?d/l:d*Math.pow(2,1-u))*l>=2&&(o++,l/=2),o+u>=h?(a=0,o=h):o+u>=1?(a=(t*l-1)*Math.pow(2,s),o+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,s),o=0));s>=8;e[r+p]=255&a,p+=f,a/=256,s-=8);for(o=o<0;e[r+p]=255&o,p+=f,o/=256,c-=8);e[r+p-f]|=128*m}},57:function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},58:function(e,t){var r,n,s=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var l,c=[],h=!1,u=-1;function d(){h&&l&&(h=!1,l.length?c=l.concat(c):u=-1,c.length&&p())}function p(){if(!h){var e=a(d);h=!0;for(var t=c.length;t;){for(l=c,c=[];++u1)for(var r=1;r